B:zig(3,10),coloryellow;
G:=MA(B,2),colorred;
D:=EMA(B,34),colorgreen;
J:=EMA(B,144),colorligreen;
DRAWICON(crOSS(B,G),B-0.1,1);
DRAWICON(CROSS(G,B),G+0.1,2);
//DRAWTEXT(CROSS(B,G),B*0.85,"建"),coloryellow;
//DRAWTEXT(CROSS(G,B),G,"清"),colorgreen;
F:=100*(C-REF(C,1))/REF(C,1);
JD:=IF(C
S1:=JD;
MR:=IF(C
S2:=MR;
A1:=S1=0 AND REF(S1,1)=1 AND S2=0 AND REF(S2,1)=1 AND CROSS(ZIG(3,3) ,REF(ZIG(3 ,3),1));
A2:=S1=0 AND REF(S1,1)=1 AND S2=0 AND REF(S2,1)=1 AND CROSS(ZIG(3,5) ,REF(ZIG(3 ,5),1));
//DRAWTEXT(A1 AND A2 OR D<0,B,'加仓'),coloryellow;//加仓买
//DRAWICON(A1 AND A2,B-0.2,1);
VAR3:=PEAKBARS(3,5,1)<10;
VAR5:=IF(VAR3=1,2,0);
顶:= IF(VAR5=2,2,0);
顶A:=IF(顶>REF(顶,1),1,0),STICK,colorcyan, LINETHICK2;//
//DRAWTEXT(顶A=1,B*1.1,'减仓'),colorgreen;
DRAWICON(顶A=1,B,2);
A11:LLV(LOW,144),colormagenta;
//DRAWICON(A11==REF(A11,1) AND REF(A11,1)
//DRAWICON(A11
//DRAWICON(A11>REF(A11,1) AND REF(A11,1)==REF(A11,2),A11,1);
MID:=MA(CLOSE,26);
UPPER:=MID + 2*STD(CLOSE,26),colorwhite;//上轨
UPPER1:=MID + 1.618*STD(CLOSE,26),colorred;//上轨
LOWER:=MID - 2*STD(CLOSE,26),coloryellow;//下轨
LOWER1:=MID - 1.618*STD(CLOSE,26),colorgreen;//下轨
//DRAWTEXT(CROSS(CLOSE,LOWER),J*1.05,"L"),coloryellow;;
//DRAWTEXT(CROSS(CLOSE,UPPER),J*1.05,"L"),colorgreen;
DRAWICON(CROSS(B,A11),B,1);
DRAWICON(CROSS(A11,B),B,2);
VERLINE(CROSS(B,G) AND (A1 AND A2 OR D<0),1),colorlimagenta;//画加仓建仓垂线
VERLINE(CROSS(G,B),1),colorcyan;//画清仓垂线
STICKLINE(A11REF(B,1),B,A11,0.8,0),colorred;
STICKLINE(A11
DRAWTEXT((CROSS(B,G) AND (A1 AND A2 OR D<0)) OR CROSS(B,G),A11*0.95,'B'),coloryellow;//建仓加仓买
STICKLINE(A11>B AND B>REF(B,1),B,A11,0.8,0),colorred;
STICKLINE(A11>B AND B
A34:=LLV(B,34),coloryellow;
A55:=LLV(B,55),coloryellow;
A144:=LLV(B,144),coloryellow;
AA:=(CROSS(B,G) AND (A1 AND A2 OR D<0)) OR CROSS(B,G);
POLYLINE(AA==1,REF(B,1)),coloryellow;
CC:=CLOSE,colorwhite;
DD7:DYNAINFO(7),nodraw;
DD1:=DYNAINFO(1),nodraw;
DD2:=DYNAINFO(2),nodraw;
DD3:=DYNAINFO(3),nodraw;
DD4:=DYNAINFO(4),nodraw;
DD5:=DYNAINFO(5),nodraw;
DD6:=DYNAINFO(6),nodraw;
DD7:=DYNAINFO(7),nodraw;
DD9:=DYNAINFO(9),nodraw;
DD11:=DYNAINFO(11),nodraw;
DD20:=DYNAINFO(20),nodraw;
DD21:=DYNAINFO(21),nodraw;
DD28:=DYNAINFO(28),nodraw;
DD29:=DYNAINFO(29),nodraw;
DD30:=DYNAINFO(30),nodraw;
//macd
DIFF:=EMA(CLOSE,12) - EMA(CLOSE,26);
DEA:=EMA(DIFF,9);
MacD:=2*(DIFF-DEA);
DRAWTEXT(CROSS(DIFF,DEA),A11,"M"),coloryellow;
DRAWTEXT(CROSS(DEA,DIFF),A11,"M"),colorgreen;
H1:HOD(H,144),nodraw;
L1:LOD(L,144),nodraw;
DRAWTEXT(H1=144 AND L1=1 AND B>A11,A11*0.95,"HL"),colorred;
LLV1:LLVBARS(L,21),nodraw;
DRAWNUMBER(REF((CROSS(B,G) AND (A1 AND A2 OR D<0)) OR CROSS(B,G),1),A11*0.95,TOSTRING(A11,2));