VAR1:=(20*H+19*REF(H,1)+18*REF(H,2)+17*REF(H,3)+16*REF(H,4)+15*REF(H,5)+14*REF(H,6)+13*REF(H,7)+12*REF(H,8)+11*REF(H,9)+10*REF(H,10)+9*REF(H,11)+8*REF(H,12)+7*REF(H,13)+6*REF(H,14)+5*REF(H,15)+4*REF(H,16)+3*REF(H,17)+2*REF(H,18)+REF(H,20))/210,COLORBLUE,LINETHICK1;
VAR2:=(20*L+19*REF(L,1)+18*REF(L,2)+17*REF(L,3)+16*REF(L,4)+15*REF(L,5)+14*REF(L,6)+13*REF(L,7)+12*REF(L,8)+11*REF(L,9)+10*REF(L,10)+9*REF(L,11)+8*REF(L,12)+7*REF(L,13)+6*REF(L,14)+5*REF(L,15)+4*REF(L,16)+3*REF(L,17)+2*REF(L,18)+REF(L,20))/210;
VAR3:=EMA(VAR1,90)+(EMA(VAR1,90)-EMA(VAR2,90))*2;
VAR4:=EMA(VAR2,90)-(EMA(VAR1,90)-EMA(VAR2,90))*2;
VAR5:=(XMA(XMA(H,25),25)-XMA(XMA(L,25),25))*1+XMA(XMA(H,25),25);
VAR6:=XMA(XMA(L,25),25)-(XMA(XMA(H,25),25)-XMA(XMA(L,25),25))*1;
VAR7:=(XMA(XMA(H,25),25)-XMA(XMA(L,25),25))*2+XMA(XMA(H,25),25);
VAR8:=XMA(XMA(L,25),25)-(XMA(XMA(H,25),25)-XMA(XMA(L,25),25))*2;
VAR9:=(C-VAR8)/(VAR7-VAR8)*100000;
VAR10:=(O-VAR8)/(VAR7-VAR8)*100000;
VAR11:=(H-VAR8)/(VAR7-VAR8)*100000;
VAR12:=(L-VAR8)/(VAR7-VAR8)*100000;
VAR13:=EMA((EMA(CLOSE,3) - EMA(CLOSE,6)),9),COLORGREEN,LINETHICK2;
VAR14:=REF(VAR13,1),COLORWHITE,LINETHICK0;
VAR15:=EMA((EMA(EMA(CLOSE,3) - EMA(CLOSE,9),3) - EMA(EMA(CLOSE,3) - EMA(CLOSE,9),9)),9);
VAR16:=REF(VAR15,1);
VB1:=VAR6 =VAR4 AND VAR5 =VAR3;
VB2:=VAR5 =VAR3 AND VAR6 =VAR4;
VB3:=VAR6 =VAR4 AND VAR5 =VAR3;
STICKLINE(VB1=1,110000,-10000,5,0),COLOR000066;
STICKLINE(VB2=1,110000,-10000,5,0),COLOR003300;
STICKLINE(VB3=1,110000,-10000,5,0),COLOR555555;
空损:110000,COLORMAGENTA,LINETHICK2;
做空:80000,COLORLIRED,LINETHICK1,DOTLINE;
中线:50000,COLORYELLOW,LINETHICK1,DOTLINE;
做多:20000,COLORLIGREEN,LINETHICK1,DOTLINE;
多损:-10000,COLORCYAN,LINETHICK2,DOTLINE;
VB4:=CROSS(20000,VAR12) AND VB1=1;
VB5:=CROSS(VAR11,80000) AND VB2=1;
VB6:=CROSS(20000,VAR12) AND VB3=1;
VB7:=CROSS(VAR11,80000) AND VB3=1;
DRAWTEXT(ISLASTBAR,108000,'顶'),COLORMAGENTA;
DRAWTEXT(ISLASTBAR,80000,'卖'),COLORGREEN;
DRAWTEXT(ISLASTBAR,50000,'注'),COLORYELLOW;
DRAWTEXT(ISLASTBAR,20000,'买'),COLORRED;
DRAWTEXT(ISLASTBAR,-9000,'底'),COLORMAGENTA;
STICKLINE(VAR14 VAR13 OR VAR16 VAR15,VAR12,VAR11,0.0,0),COLORRED;
STICKLINE(VAR14 VAR13 OR VAR16 VAR15,VAR9,VAR10,3,1),COLORRED;
STICKLINE(VAR13 VAR14,VAR12,VAR11,0.0,0),COLORGREEN;
STICKLINE(VAR13 VAR14,VAR9,VAR10,3,1),COLORGREEN;
STICKLINE(VAR12 20000 AND VAR11 20000,VAR12,20000,1,1),COLORMAGENTA;
STICKLINE(VAR11 80000 AND VAR12 80000,VAR11,80000,1,1),COLORCYAN;
STICKLINE(VAR11 20000,VAR12,VAR11,0.0,0),COLORWHITE;
STICKLINE(VAR11 20000,VAR9,VAR10,3,1),COLORBLUE;
STICKLINE(VAR12 80000,VAR12,VAR11,0.0,0),COLORWHITE;
STICKLINE(VAR12 80000,VAR9,VAR10,3,1),COLORYELLOW;
DRAWICON(CROSS(20000,VAR12) AND VB2=1 AND VB3=0,VAR12,1);
DRAWICON(CROSS(VAR11,80000) AND VB1=1 AND VB3=0,VAR11,2);
DRAWTEXT(VB4=1 OR VB6=1,VAR12,'B'),COLORGREEN;
DRAWTEXT(VB5=1 OR VB7=1,VAR11,'S'),COLORRED;