MIDA:=MA(C,20);
VART1:=POW((C-MIDA),2);
VART2:=MA(VART1,20);
VART3:=SQRT(VART2);
UPPERA:=MIDA+2*VART3;
LOWERA:=MIDA-2*VART3;
中轨:REF(MIDA,1);
上轨:REF(UPPERA,1);
下轨:REF(LOWERA,1);
DRAWICON(C>下轨 AND (REF(L,1)<REF(下轨,1) OR L<下轨) AND REF(C>下轨 AND (REF(L,1)<REF(下轨,1) OR L<下轨),1)=0,L*0.98,1);
DRAWICON(CROSS(上轨,C) AND REF(C,1)>REF(上轨,1),H*1.02,2);
DRAWICON(C>中轨 AND (REF(L,1)<REF(中轨,1) OR L<中轨) AND REF(C>中轨 AND (REF(L,1)<REF(中轨,1) OR L<中轨),1)=0,L*0.98,7);
DRAWICON(CROSS(中轨,C) AND REF(C,1)>REF(中轨,1),L*0.98,8);
涨停1:=C>=REF(C,1)*1.099 AND C=H;
涨停:=C>=REF(C,1)*1.07;
DRAWTEXT(涨停1,L*0.97,'涨停'),COLOR00FFFF;
跌停:=C<=REF(C,1)/1.099 AND C=L;
STICKLINE(跌停,O,C,2.5,0),COLORFFFFFF;
STICKLINE(跌停,H,L,0,1),COLORFFFFFF;