NN:=20;
MIDA:=MA(C,NN);
VART1:=POW((C-MIDA),2);
VART2:=MA(VART1,NN);
VART3:=SQRT(VART2);
UPPERA:=MIDA+2*VART3;
LOWERA:=MIDA-2*VART3;
BOLL:REF(MIDA,1)COLORRED,LINETHICK2;
UB:REF(UPPERA,1)COLORBLUE,LINETHICK2;
LB:REF(LOWERA,1)COLORGREEN,LINETHICK2;
上穿下轨:CROSS(CLOSE,LB) AND C>REF(C,1),COLORRED,NODRAW;
DRAWICON(上穿下轨,L*0.95,7);
昨日中轨:=REF(C,1)>BOLL;
回踩中轨:=(L-BOLL)/L<=0.01 AND (L-BOLL)/L>=-0.01 AND C>BOLL AND C>O;
中轨连涨:=UPNDAY(BOLL,3);
回踩布林中轨:回踩中轨 AND 昨日中轨 AND 中轨连涨,COLORLIRED,NODRAW;
DRAWICON(回踩布林中轨,L*0.995,1);
收口:=(UB-LB)/LB<=0.25;
上穿轨道:=CROSS(C,BOLL) OR CROSS(C,UB);
中轨向上:=BOLL>REF(BOLL,1) OR BOLL=REF(BOLL,1);
布林收口选股:收口 AND 上穿轨道 AND 中轨向上,NODRAW;
DRAWICON(布林收口选股,L*0.985,23);
昨日上轨:=REF(CROSS(C,UB),1);
回踩上轨:=(L-UB)/L<=0.01 AND (L-UB)/L>=-0.01 AND C>UB AND C>L;
回踩上轨选股:昨日上轨 AND 回踩上轨,NODRAW;
DRAWICON(回踩上轨选股,L*0.975,21);