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