• 通达信 -- > 选股


    {R1剔除成交量过大}
    TMP1_VOL_RATE:=1.2;{成交量比例}
    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);}

    {R2剔除天量}
    T1_1:=6;{表示多少倍}
    T1_2:=60;{多少天内}
    R2:=IF(ANY(VOL>(REF(VOL,1)*T1_1), T1_2),0,1);

    {R3剔除涨幅过大}
    R3_TMP_PRICE:=DYNAINFO(14);
    R3:=IF(R3_TMP_PRICE<-0.008,1,0);

    {R4剔除跌幅过大}
    R4:=IF(R3_TMP_PRICE>-0.04,1,0);

    {--R5剔除停牌股}
    R5:=IF((DYNAINFO(4)>0),1,0);{开盘价}

    {--R6实体线长度限制}
    TMP6_PRICE_RATE:=0.020;{实体大小限制}
    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:=300;{单位:亿}
    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.04;{涨幅限制}
    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_5:=MA(CLOSE,5);{5日均线}
    T13_10:=MA(CLOSE,10);{10日均线}
    T13_20:=MA(CLOSE,20);{20日均线}
    T13_30:=MA(CLOSE,30);{30日均线}
    T13_60:=MA(CLOSE,60);{60日均线}
    R13:=IF(T13_10<T13_20 AND T13_20<T13_30,0,1);

    {R14股价与均线限制}
    T14_CURR:=DYNAINFO(7);
    R14:=IF(T14_CURR<T13_5 AND T14_CURR<T13_10 AND T14_CURR<T13_20,0,1);{现价同时低于30与60均线}

    {--R15剔除前两个交易日涨幅过大}
    TMP15_MAX:=0.04;{涨幅限制}
    R15:=IF(((REF(CLOSE,2)-REF(CLOSE, 3))/REF(CLOSE, 3)) < TMP15_MAX, 1, 0);


    {总结果}
    IF ((R1 AND R2 AND R3 AND R4 AND R7 AND R10 AND R13 AND R14), 1, 0);

  • 相关阅读:
    矩阵解压,网络流UESTC-1962天才钱vs学霸周2
    最小生成树唯一性判断-UESTC1959天才钱vs学霸周
    度及拓扑图的使用-UESTC1958学霸周选课
    CodeForces1000A-Light It Up
    CodeForces1000A- Codehorses T-shirts
    CoderForces999F-Cards and Joy
    CoderForces999E-Reachability from the Capital
    CoderForces999D-Equalize the Remainders
    CoderForces999C-Alphabetic Removals
    CoderForces999B- Reversing Encryption
  • 原文地址:https://www.cnblogs.com/ftrako/p/4848861.html
Copyright © 2020-2023  润新知