去除ST股:=NOT(NAMELIKE('ST') OR NAMELIKE('*ST') OR NAMELIKE('S'));
去除星股:=IF(NAMELIKE('*'),0,1);
去除停牌:=DYNAINFO(8)>0;
去除股:=去除ST股 AND 去除星股 AND 去除停牌;
BOLL:=MA(CLOSE,M);
UB:=BOLL+2*STD(CLOSE,M);
LB:=BOLL-2*STD(CLOSE,M);
MID:=MA(C,20);
VART1:=POW((C-MID),2);
VART2:=MA(VART1,20);
VART3:=SQRT(VART2);
UPPER:=MID+2*VART3;
LOWER:=MID-2*VART3;
AA:=(C>LB AND REF(LB,1)>REF(L,1) AND REF(LB,2)>REF(L,2) AND REF(LB,3)>REF(L,3)) OR (LOWER<C AND REF(LB,1)>REF(L,2) AND REF(LB,2)>REF(L,3) AND LB>REF(L,1) AND REF(LB,3)>REF(L,4) OR (REF(UB,4)<REF(H,4) AND REF(LB,1)>REF(L,1) AND REF(C,1)/C<1.095));
XG:AA AND 去除股;