{突破 主}
R1:=(C>REF(C,1)AND C>REF(C,2)); R2:=(REF(R1,1)AND C<=REF(C,1)AND C>=REF(C,2));
R3:=(REF(R2,1)AND C>=REF(C,1)AND C<=REF(C,2)); R4:=(REF(R3,1)AND C<=REF(C,1)AND C>=REF(C,2));
R5:=(REF(R4,1)AND C>=REF(C,1)AND C<=REF(C,2)); R6:=(REF(R5,1)AND C<=REF(C,1)AND C>=REF(C,2));
R7:=(REF(R6,1)AND C>=REF(C,1)AND C<=REF(C,2)); R8:=(REF(R7,1)AND C<=REF(C,1)AND C>=REF(C,2));
R9:=(REF(R8,1)AND C>=REF(C,1)AND C<=REF(C,2)); A1:=(REF(R9,1)AND C<=REF(C,1)AND C>=REF(C,2));
A2:=(REF(A1,1)AND C>=REF(C,1)AND C<=REF(C,2)); A3:=(REF(A2,1)AND C<=REF(C,1)AND C>=REF(C,2));
A4:=(C<REF(C,1)AND C<REF(C,2)); A5:=(REF(A4,1)AND C>=REF(C,1)AND C<=REF(C,2));
A6:=(REF(A5,1)AND C<=REF(C,1)AND C>=REF(C,2)); A7:=(REF(A6,1)AND C>=REF(C,1)AND C<=REF(C,2));
A8:=(REF(A7,1)AND C<=REF(C,1)AND C>=REF(C,2)); A9:=(REF(A8,1)AND C>=REF(C,1)AND C<=REF(C,2));
B1:=(REF(A9,1)AND C<=REF(C,1)AND C>=REF(C,2)); B2:=(REF(B1,1)AND C>=REF(C,1)AND C<=REF(C,2));
B3:=(REF(B2,1)AND C<=REF(C,1)AND C>=REF(C,2)); B4:=(REF(B3,1)AND C>=REF(C,1)AND C<=REF(C,2));
B5:=(REF(B4,1)AND C<=REF(C,1)AND C>=REF(C,2)); B6:=(REF(B5,1)AND C>=REF(C,1)AND C<=REF(C,2));
B7:=REF(A4 OR A5 OR A6 OR A7 OR A8 OR A9 OR B1 OR B2 OR B3 OR B4 OR B5 OR B6,1)AND R1;
B8:=((REF(R1 OR R2 OR R3 OR R4 OR R5 OR R6 OR R7 OR R8 OR R9 OR A1 OR A2 OR A3,1))AND A4);
T1:=HHV(C,4); T2:=REF(C,1); T3:=REF(C,2); T4:=REF(C,3); T5:=LLV(C,4);
STICKLINE(C>=OPEN,C,OPEN,3.2,0),COLOR0000AA;
STICKLINE(C>=OPEN,C,OPEN,2.2,0),COLOR0000CC;
STICKLINE(C>=OPEN,C,OPEN,1.0,0),COLOR0000EE;
STICKLINE(C>=OPEN,C,OPEN,0.1,0),COLORAA55FF;
STICKLINE(OPEN>=C,C,OPEN,3.2,0),COLOR009900;
STICKLINE(OPEN>=C,C,OPEN,1.5,0),COLOR00BB00;
STICKLINE(OPEN>=C,C,OPEN,0.6,0),COLOR00DD00;
STICKLINE(OPEN>=C,C,OPEN,0.1,0),COLOR00FF00;
Q:=C=T5 AND(T2<T3 OR T2<T4)OR T2=T5 AND C<T3 OR T3=T5 AND T2!=T1 AND C<T2 OR T4=T5 AND C<T2 AND C<T3; W:=O+C;
STICKLINE(Q,C,W/2,3.1,0),COLOR999999;
STICKLINE(Q,C,W/2,2,0),COLORBBBBBB;
STICKLINE(Q,C,W/2,1,0),COLORDDDDDD;
STICKLINE(Q,C,W/2,0.1,0),COLORFFFFFF;
S:=T2=T5 AND C>=T3 OR T3=T5 AND T2<=T4 AND T3<REF(C,4)AND C>=T2;
STICKLINE(S,O,W/2,3.1,0),COLOR999900;
STICKLINE(S,O,W/2,2,0),COLORBBBB00;
STICKLINE(S,O,W/2,1,0),COLORDDDD00;
STICKLINE(S,O,W/2,0.1,0),COLORFFFF00;
STICKLINE(B7,REF(C,1),REF(C,2),3.2,0),COLOR335555;
STICKLINE(B7,REF(C,1),REF(C,2),2.5,0),COLOR338888;
STICKLINE(B7,REF(C,1),REF(C,2),1.5,0),COLOR33AAAA;
STICKLINE(B7,REF(C,1),REF(C,2),0.8,0),COLOR33CCCC;
STICKLINE(B7,REF(C,1),REF(C,2),0.1,0),COLOR33EEEE;
STICKLINE(B8,REF(C,1),REF(C,2),3.0,0),COLORAA0000;
STICKLINE(B8,REF(C,1),REF(C,2),2.0,0),COLORCC0000;
STICKLINE(B8,REF(C,1),REF(C,2),1.1,0),COLORFF4400;
STICKLINE(B8,REF(C,1),REF(C,2),0.2,0),COLORFF8800;
STICKLINE(B8,REF(C,1),REF(C,2),0.0,0),COLORFFCC00;
四:=SUMBARS(VOL,CAPITAL/4),NODRAW; 二:=SUMBARS(VOL,CAPITAL/2),NODRAW; ZJ:=MA(C,二){中期成本均线};
XJ:=MA(C,四){近期成本均线}; T:=C>XJ; P:=XJ>ZJ; Z:=ZJ>Q;I:=MAX(O,C);
STICKLINE(T AND P AND Z,I,W/2,3.1,0),COLOR880088;
STICKLINE(T AND P AND Z,I,W/2,2,0),COLORBB00BB;
STICKLINE(T AND P AND Z,I,W/2,1,0),COLORDD00DD;
STICKLINE(T AND P AND Z,I,W/2,0.1,0),COLORFF00FF;
STICKLINE(C=C,O+((C-O)/2),(O+(C-O)/2),3,0),COLOR00FFFF;{当日实体幅度的1/2}
AA1:=EMA(C,5); AA2:=EMA(C,10);
突破:REF(AA2,1),COLORMAGENTA,DOTLINE; AA3:=AA1-突破; AA4:=((AA3)/突破*100);
A:=IF(AA4>=0,REF(AA2,BARSLAST(CROSS(AA4,0))+1),DRAWNULL);
B:=IF(AA4<0,REF(AA2,BARSLAST(CROSS(0,AA4))+1),DRAWNULL);
STICKLINE(A,A,A,4,-1)COLORMAGENTA;
STICKLINE(B,B,B,4,-1)COLORGREEN;
STICKLINE(AA4>=0,A,突破,0,-1)COLORMAGENTA;
STICKLINE(AA4<0,B,突破,0,-1)COLORGREEN;
持币:=IF(AA4<0,突破,DRAWNULL)COLORFFCC00,DOTLINE;
DRAWTEXT(ISLASTBAR AND A,A-0.1,'出击'),COLORMAGENTA;
DRAWTEXT(ISLASTBAR AND B,B+0.15,'休假'),COLORGREEN;
顶:HHV(H,60),COLORFF00FF,DOTLINE; 底:LLV(L,60),COLORWHITE,DOTLINE;
MA5:MA(C,5)COLORWHITE;
MA18:MA(C,18)COLOR0080FF;
MA21:MA(C,21)COLORYELLOW;
MA35:MA(C,35)COLOR00FF00;
MA60:MA(C,35)COLORRED;
盈损线:MA(MA5,1),LINETHICK2,COLOR00FF00;
IF(盈损线>=REF(盈损线,1),盈损线,DRAWNULL),COLORRED,LINETHICK2;
DRAWTEXT((MA18>=REF(MA18,3)AND CROSS(C,MA18)),L-0.05,'↖跟'),COLORRED;
获利%:WINNER(C)*100,NODRAW,COLORFF00FF;
{涨跌停提示}XX:=REF(C,1);ZDF:=(C-XX)/XX*100;
DRAWTEXT(C>=1.099*XX,C*1.01,'↙涨停'),COLORYELLOW;
DRAWTEXT(ZDF<-9.9,C*1.01,'↖跌停'),COLOR00FF00;
AA8:=ZIG(3,5); AA9:=REF(AA8,1);
DRAWICON((AA8>AA9)AND(AA9<=REF(AA8,2))AND(REF(AA8,2)<=REF(AA8,3)),L-0.15,23);
DRAWICON((AA8<AA9)AND(AA9>=REF(AA8,2))AND(REF(AA8,2)>=REF(AA8,3)),H+0.01,15);
DRAWTEXT_FIX(1,0.0,0.0,0,'蓝柱-高位出货坚决'),COLOR0080FF,LINETHICK1;
DRAWTEXT_FIX(1,0.00,0.06,0,'白柱-主力洗盘'),COLORWHITE,LINETHICK1;
DRAWTEXT_FIX(1,0.00,0.12,0,'绿柱-主力深度洗盘'),COLORGREEN,LINETHICK1;
DRAWTEXT_FIX(1,0.00,0.18,0,'粉柱-主力在做高抛低吸或低吸高抛'),COLORFF00FF,LINETHICK1;
DRAWTEXT_FIX(1,0.00,0.24,0,'红柱-主力吸筹进货积极主动'),COLORRED,LINETHICK1;