{R1剔除成交量过大}
TMP1_VOL_RATE:=1.5;{成交量比例}TMP1_MA100:=MA(VOL, 30);{30日均成交量}T1_1:=REF(VOL,1);{前一天的成交量}R1:=IF(DYNAINFO(8)/TMP1_MA100<=TMP1_VOL_RATE,1,0);{R1:=IF(DYNAINFO(8)<= T1_1*2,1,0);}{R3剔除涨幅过大}
R3_TMP_PRICE:=DYNAINFO(14);R3:=IF(R3_TMP_PRICE<=0.015,1,0); {R4剔除跌幅过大}R4:=IF(R3_TMP_PRICE>-0.02,1,0); {--R5剔除停牌股}R5:=IF((DYNAINFO(4)>0),1,0);{开盘价}{R6实体线长度限制}
TMP6_PRICE_RATE:=0.025;{实体大小限制}TMP6_SUB:=DYNAINFO(7)/DYNAINFO(4);{现价/开盘价}TMP6_SUB2:=IF(TMP6_SUB < 1, 1-TMP6_SUB, TMP6_SUB-1);{考虑跌的情况}R6:=IF ((TMP6_SUB2<=TMP6_PRICE_RATE),1,0);{R7剔除大盘股}
TMP7_PRICE:=1200;{单位:亿}R7:=IF((FINANCE(40)<=TMP7_PRICE*10000),1,0);{--R8剔除次新股}
TMP8_DAYS:=100;R8:=IF((FINANCE(42)>TMP8_DAYS),1,0);{上市天数}{R9剔除换手率过大和过小}
TMP9_MIN:=0.00001;TMP9_MAX:=0.20;R9_MIN:=IF(DYNAINFO(37)>TMP9_MIN, 1, 0);R9_MAX:=IF(DYNAINFO(37)<=TMP9_MAX, 1, 0);R9:=IF(R9_MAX, 1, 0);{--R10剔除前一个交易日涨幅过大}
TMP10_MAX:=0.05;{涨幅限制}R10:=IF(((REF(CLOSE,1)-REF(CLOSE, 2))/REF(CLOSE, 2)) < TMP10_MAX, 1, 0);{--R11剔除前一个交易日跌幅过大}
TMP11_MAX:=-0.08;{跌幅限制}R11:=IF(((REF(CLOSE,1)-REF(CLOSE, 2))/REF(CLOSE, 2)) > TMP11_MAX, 1, 0);{--R12剔除ST股}
R12:=IF(NAMELIKE('*'),0,IF(NAMELIKE('S'), 0, 1));{R13均线比较}
T13_20:=MA(CLOSE,20);{20日均线}T13_30:=MA(CLOSE,30);{30日均线}T13_60:=MA(CLOSE,60);{60日均线}R13:=IF(T13_20<T13_30 AND T13_30<T13_60,0,1);{R14股价与均线限制}
R14:=IF(DYNAINFO(7)<T13_30 AND DYNAINFO(7)<T13_60,0,1);{现价同时低于30与60均线} {总结果}IF ((R1 AND R3 AND R4 AND R6 AND R7 AND R9 AND R13 AND R14), 1, 0);