N1:=20;
N2:=60;
VAR1:=(LOW+HIGH+CLOSE)/3;
X: MA(VAR1,5);
A1: HHV(X,N1)COLORMAGENTA;
A2: HHV(X,N2),COLORGREEN;
A3: HHV(HIGH,N2)*0.98,COLOR0000FF;
B1: LLV(X,N1);
B2: LLV(LOW,N2)*1.02;
DRAWICON(X>B1 AND REF(X,1)=REF(B1,1),B1*0.99,1);
DRAWTEXT(X=A1 AND REF(X,1)FD:=(H-L)/3;{分段}
OPEN1:=O>FD*2+L;
OPEN3:=O
CLOSE1:=C>FD*2+L;
CLOSE3:=C
DFZD:=CLOSE1 OR (OPEN3 AND CLOSE2);
WQS1:=OPEN2 AND CLOSE2;
KFZD:=NOT(DFZD OR WQS1);
ZD:=(H+L)/2;
QSXS:=ZD>REF(H,1);
QSXX:=ZDWQS2:=NOT(QSXS OR QSXX);
S1:=DFZD AND QSXS ;
S2:=KFZD AND QSXX ;
S3:=DFZD AND QSXX;
S4:=KFZD AND QSXS;
S5:=DFZD AND WQS2;
S6:=KFZD AND WQS2;
S7:=WQS1 AND (QSXS OR QSXX OR WQS2);
STICKLINE(S2 ,C ,O,3,0 ),COLORFF2020;
STICKLINE(S1,C,O,3 ,0 ),COLOR2020FF;
STICKLINE(S3,C,O,3,0),COLORYELLOW;
STICKLINE(S4,C,O,3,0),COLORCYAN;
STICKLINE(S5,C,O,3,0),COLORMAGENTA;
STICKLINE(S6,C,O,3,0),COLORGREEN;
STICKLINE(S7,C,O,3,0),COLORGRAY;
STICKLINE(1,C,O,0,0),COLORWHITE;