N:=10;
ZF:=5;
放量上涨:=CLOSE/REF(CLOSE,1)>=1.01 AND vol/REF(VOL,1)>=1.5 AND VOL>MA(VOL,5) AND REF(VOL,1)/REF(MA(VOL,5),1)<=1.8;
箱体形成:=((HHV(C,3)/LLV(C,N)-1)*100<=ZF AND (HHV(C,N)/LLV(C,3)-1)*100<=ZF)*0.3;
接近箱顶:=(CLOSE/REF(HHV(CLOSE,N),2)<=1.02 AND HIGH/REF(HHV(CLOSE,N),2)>=0.98)*0.5;
P1:=BArslAST(箱体形成);
P2:=BARSLAST(接近箱顶);
期待突破:(放量上涨 AND 接近箱顶 AND P1<=3 AND P2<=1)*2;