M:=150;
西线:=EMA(C,2);
电线:=EMA(SLOPE(C,21)*20+C,42);
STICKLINE(西线>=电线,REFDATE(HHV(H,M),DATE),REFDATE(LLV(L,M),DATE),5,0),
COLOR000999;
STICKLINE(西线<电线,REFDATE(HHV(H,M),DATE),REFDATE(LLV(L,M),DATE),5,0),
COLOR808000 ; DRAWKLINE(H,O,L,C);
DA1:=IF(130>TOTALBARSCOUNT,TOTALBARSCOUNT,130);
DA:=IF(CURRBARSCOUNT>DA1,0,DA1);
HI:=REFDATE(HHV(H,DA),DATE);
LO:=REFDATE(LLV(L,DA),DATE);
C1:=IF(CURRBARSCOUNT<=DA,C,DRAWNULL);
GZ:=EXP(LN(HI/LO)/10);
LH1:=SUM(IF(C1>=(HI/GZ),V,0),DA);
LH2:=SUM(IF(C1>=(HI/POW(GZ,2)) AND C1<(HI/GZ),V,0),DA);
LH3:=SUM(IF(C1>=(HI/POW(GZ,3)) AND C1<(HI/POW(GZ,2)),V,0),DA);
LH4:=SUM(IF(C1>=(HI/POW(GZ,4)) AND C1<(HI/POW(GZ,3)),V,0),DA);
LH5:=SUM(IF(C1>=(HI/POW(GZ,5)) AND C1<(HI/POW(GZ,4)),V,0),DA);
LH6:=SUM(IF(C1>=(HI/POW(GZ,6)) AND C1<(HI/POW(GZ,5)),V,0),DA);
LH7:=SUM(IF(C1>=(HI/POW(GZ,7)) AND C1<(HI/POW(GZ,6)),V,0),DA);
LH8:=SUM(IF(C1>=(HI/POW(GZ,8)) AND C1<(HI/POW(GZ,7)),V,0),DA);
LH9:=SUM(IF(C1>=(LO*GZ) AND C1
L2:=REFDATE(HHV(LH2,DA),DATE);
L3:=REFDATE(HHV(LH3,DA),DATE);
L4:=REFDATE(HHV(LH4,DA),DATE);
L5:=REFDATE(HHV(LH5,DA),DATE);
L6:=REFDATE(HHV(LH6,DA),DATE);
L7:=REFDATE(HHV(LH7,DA),DATE);
L8:=REFDATE(HHV(LH8,DA),DATE);
L9:=REFDATE(HHV(LH9,DA),DATE);
L10:=REFDATE(HHV(LH10,DA),DATE);
SS:=(L1+L2+L3+L4+L5+L6+L7+L8+L9+L10);
A1:(CEILING(DA*L1/SS)*3>=CURRBARSCOUNT,HI*99/100,HI/GZ);
A2:(CEILING(DA*L2/SS)*3>=CURRBARSCOUNT,HI/POW(GZ,1)*99/100,HI/POW(GZ,2)),POINTDOT;
A3:(CEILING(DA*L3/SS)*3>=CURRBARSCOUNT,HI/POW(GZ,2)*99/100,HI/POW(GZ,3)),POINTDOT;
A4:(CEILING(DA*L4/SS)*3>=CURRBARSCOUNT,HI/POW(GZ,3)*99/100,HI/POW(GZ,4)),POINTDOT;
A5:(CEILING(DA*L5/SS)*3>=CURRBARSCOUNT,HI/POW(GZ,4)*99/100,HI/POW(GZ,5)),DOTLINE;
A6:(CEILING(DA*L6/SS)*3>=CURRBARSCOUNT,HI/POW(GZ,5)*99/100,HI/POW(GZ,6)),DOTLINE;
A8:(CEILING(DA*L8/SS)*3>=CURRBARSCOUNT,LO*POW(GZ,2),LO*POW(GZ,3)*99/100),POINTDOT;
A9:(CEILING(DA*L9/SS)*3>=CURRBARSCOUNT,LO*POW(GZ,1),LO*POW(GZ,2)*99/100),POINTDOT;
A10:(CEILING(DA*L10/SS)*3>=CURRBARSCOUNT,LO,LO*POW(GZ,1)*99/100);
DRAWKLINE(H,O,L,C);
DRAWTEXT(ISLASTBAR,A1,'10');
DRAWTEXT(ISLASTBAR,A2,'9');
DRAWTEXT(ISLASTBAR,A3,'8');
DRAWTEXT(ISLASTBAR,A4,'7');
DRAWTEXT(ISLASTBAR,A5,'6');
DRAWTEXT(ISLASTBAR,A6,'5');
DRAWTEXT(ISLASTBAR,A8,'3');
DRAWTEXT(ISLASTBAR,A9,'2');
DRAWTEXT(ISLASTBAR,A10,'1');
AC:=(2*C-H-L)*V/CAPITAL*100*0.618;
MX:=MAX(AC,MAX(ABS(AC-REF(H,1)),ABS(AC-REF(L,1))));
WX5:WMA(MX,5),COLOR00FF00;
ZC:=(2*C+H+L)/4;
ZC5:WMA(ZC,5),COLOR00FFFF;
ZW:2.5*ZC5-1.5*WX5,COLORFF9900;
DRAWBAND(WX5,RGB(0,80,0),ZC5,RGB(80,0,80));
DRAWBAND(WX5,RGB(0,80,0),ZW,RGB(80,0,80));
WMA(ZC,5),COLOR00FFFF;
WMA(MX,5),COLOR00FF00;
2.5*ZC5-1.5*WX5,COLORFF9900;
IF(ZC5>REF(ZC5,1),ZC5,DRAWNULL),COLOR0077FF,LINETHICK3;
IF(WX5
STICKLINE(CLOSE>OPEN OR CLOSE=OPEN AND CLOSE>REF(CLOSE,1),LOW,HIGH,0.0,0),COLORRED;
STICKLINE(CLOSE
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,2,0 ),COLOR00AA00;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,1,0 ),COLOR00DD00;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,0,0 ),COLOR00FF00;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,3,0) ,COLOR000088;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,2,0) ,COLOR0000AA;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,1,0) ,COLOR0000DD;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,0,0) ,COLOR0000FF;
SJ:=WMA((C-LLV(L,13))/(HHV(H,5)-LLV(L,13))*100,5);
ZJ:=WMA(0.667*REF(SJ,1)+0.333*SJ,2);
金九:=CROSS(ZJ,SJ) AND SJ>70;
西电:=CROSS(SJ,ZJ) AND SJ<30;
STICKLINE(西电,OPEN,CLOSE,3,0),COLORFF0099;
STICKLINE(金九,OPEN,CLOSE,3,0),COLORWHITE;
DRAWICON(金九,LOW*1.08,14);
DRAWICON(西电,HIGH*0.91,13);
DRAWICON(CROSS(西线,电线),LOW*0.99,1);
DRAWICON(CROSS(电线,西线),HIGH*1.01,2);