MA_DAYS:=MA(CLOSE, DAYS);{N天均价}
R1:=IF(((CLOSE/MA_DAYS)<=(RATE+1)), 1, 0);
R2:=IF((DYNAINFO(4)>0),1,0);{剔除停牌股}
R3:=IF(NAMELIKE('S'),0,1);{剔除ST股}
IF ((R1 AND R2 AND R3), 1, 0);
备注:
MA_DAYS赋值:收盘价的DAYS日简单移动平均
R1赋值:如果((收盘价/MA_DAYS)<=(RATE+1)),返回1,否则返回0
R2赋值:如果(开盘价>0),返回1,否则返回0
R3赋值:如果模糊匹配品种名称,返回0,否则返回1
如果(R1ANDR2ANDR3),返回1,否则返回0