天数:=BArslAST((C-REF(C,1))/REF(C,1)<-0.06 AND O<>C AND C
阴顶:=REF(OPEN,天数);
高点:=REF(HHV(C,天数),1);
攻顶:=COUNT(H>=阴顶-0.03,天数)/天数-(COUNT(H>=阴顶-0.03,5))/天数;
攻顶比:=攻顶>0 AND 攻顶<0.5;
过顶比:=COUNT(C>=阴顶,天数)/天数<0.5;
均30:=MA((MA(C,30)-REF(MA(C,30),1))/MA(C,60)*100,1);
均60:=MA((MA(C,60)-REF(MA(C,60),1))/MA(C,60)*100,1);
长线:(均30>0 AND 均60>0 AND MA(C,30)>MA(C,60))*0.8,LINETHICK3;
短线:((MA(C,5)-MA(C,10))/MA(C,10)<0.04
AND (MA(C,10)-MA(C,20))/MA(C,20)<0.04
AND MA(C,10)>MA(C,20)
AND MA(C,5)>MA(C,30)
AND MA(C,5)>MA(C,90)
)*0.3,LINETHICK3;
缩量:(MA(V,2))/HHV(MA(V,2),天数);
涨停:=CLOSE/REF(CLOSE,1)>=1.095;
ZTCS:=COUNT(涨停,天数*2)/10>0;
过顶:天数>13 AND crOSS(C,阴顶) AND ZTCS;
{红二波:BARSLASTCOUNT((macd.MacD)>REF((MACD.MACD),1) AND (MACD.MACD)>0)/10;}
确认:=长线 AND EXIST(过顶,13) AND 缩量;
买入:=(EXIST(确认=1,3) AND MA(C,5)>MA(C,10) AND (MACD.MACD)>REF((MACD.MACD),1))*0.5
,LINETHICK5,colormagenta;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.72,0,2,'高点:'),colorwhite;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.72,0.3,2,'阴顶:'),colorwhite;
DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.8,0,2,高点),colorwhite;
DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.8,0.3,2,阴顶),colorwhite;