N:=20;
MIDA:=MA(C,N);
VART1:=POW((C-MIDA),2);
VART2:=MA(VART1,N);
VART3:=SQRT(VART2);
UPPERA:=MIDA+2*VART3;
LOWERA:=MIDA-2*VART3;
boll:REF(MIDA,1);
UB:REF(UPPERA,1);
LB:REF(LOWERA,1);
DRAWKLINE(HIGH,OPEN,LOW,CLOSE);
涨停价:=IF((C-REF(C,1))/REF(C,1)>0.097,1,0);
STICKLINE(涨停价,OPEN,CLOSE,3,0),COLORMAGENTA;
{跌停绿色}
ZDF:=(C-REF(C,1))/REF(C,1)*100;
STICKLINE(ZDF<-9.9,O,C,3.1,0),COLORGREEN;
STICKLINE(ZDF<-9.9,O,C,2.1,0),COLORGREEN;
STICKLINE(ZDF<-9.9,O,C,1.2,0),COLORGREEN;
STICKLINE(ZDF<-9.9,O,C,0.2,0),COLORGREEN;
STICKLINE(ZDF<-9.5,H,L,0,0),COLORGREEN;
{
选股公式:
crOSS(C,REF(MA(C,20),1)) AND C>REF(MA(C,20),1);
}