M:=14;
高:=MA(REF(HIGH,1)/REF(CLOSE,2),27)*REF(CLOSE,1);
低:=MA(REF(LOW,1)/REF(CLOSE,2),27)*REF(CLOSE,1);
预测高点:=高,COLORRED;
预测低点:=低,COLOR00FF00;
A:=HHV(H,M)=H AND H>REF(H,1);A1:=FILTER(A,M-1);
B:=LLV(L,M)=L AND L
TS1:=BArslAST(A1);
箱顶:=REF(HIGH,TS1);
TS11:=BARSLAST(B1);
箱底:=REF(LOW,TS11);
回踩箱顶:(L<=箱顶 AND C>箱顶) OR crOSS(C,箱顶) ;
回踩箱底:(L<=箱底 AND C>箱底) OR CROSS(C,箱底);
回踩箱体:回踩箱顶 OR 回踩箱底;
涨△边:=DRAWLINE(LOW<=LLV(LOW,14),LOW,HIGH>=HHV(HIGH,3),LLV(LOW,3),1),COLORLIRED,DOTLINE;
降△边:=IF(DRAWNULL,0,DRAWLINE(HIGH>=HHV(HIGH,14),HIGH,LOW<=LLV(LOW,3),HHV(HIGH,3),1)),COLORCYAN,DOTLINE;
回踩支撑线:(L<=涨△边 AND C>涨△边) OR CROSS(C,涨△边);
回踩:回踩箱体 OR 回踩支撑线;