NH:=120;
M:=BArslAST(CURRBARSCOUNT=NH);
GD:=CONST(IF(ISLASTBAR=1,HHV(H,M),0));
DH:=CONST(IF(ISLASTBAR=1,LLV(L,M),0));
KJ:=GD-DH;
高区:=IF(CURRBARSCOUNT<=NH,GD,DRAWNULL),LINETHICK4,COLOR004080;
TJ2:=COUNT(H>=高区,1);
去除高位:=NOT (TJ2),LINETHICK2 COLORC0C0C0;
梯量柱:=IF(V>REF(V,1) AND REF(V,1)>REF(V,2) AND REF(V,2)>REF(V,3),11,10);
N1:=120;
M1:=BARSLAST(CURRBARSCOUNT=N1);
GD1:=CONST(IF(ISLASTBAR=1,HHV(H,M1),0));
DD1:=CONST(IF(ISLASTBAR=1,LLV(L,M1),0));
KJ1:=GD1-DD1;
DP:=IF(CURRBARSCOUNT<=N1,DD1+KJ1/2,DRAWNULL),LINETHICK2,COLOR004080;
DF:=IF(CURRBARSCOUNT<=N1/2,DD1+KJ*0.618,DRAWNULL),LINETHICK2,COLOR004080;
巨量形态:=梯量柱>10 AND C>MA(CLOSE,60) AND C>MA(CLOSE,5) AND MA(CLOSE,5)>MA(CLOSE,10) AND C>DF,COLORGREEN,LINETHICK2;
顶背离:=DRAWTEXT(crOSS(88,rsi),(HIGH * 1.02),'←顶背'),LINETHICK3,COLORWHITE;
TJ3:=COUNT(顶背离,1);{5日内出现实体长度大于5%的阳线}
去除顶背离:=NOT (TJ3)>0,LINETHICK2 COLORC0C0C0;
逃顶:IF(TJ3=1 OR 巨量形态=1 OR TJ2=1,40,100),COLOR00FFFF,DOTLINE;
DRAWTEXT(逃顶=40,40,'逃顶'),COLORGREEN;