相关简介:  通达信收集最好的选股公式源码                                

     通达信指标公式源码概况:

  指标类别:通达信指标公式

  授权方式:免费版

  指标评级:★★★★★

  指标分类:策略

  画线方法:副图

买入:需要注意的是,当目标出现以后,我们不能急着买进(因为很多时候盘中二次翻红后到收盘的时候信号消失了,那就说明这不是二次翻红)所有我们要等到收盘前5分钟确定是二次翻红再买进,因为我们买进是为了奔第2天的利润而买进,收盘前几分钟买进还可以避免当天下跌的风险!

卖出:买进后第2天一般都是直接在昨天的收盘价上加多1%挂单卖出,当然你也可以挂多2%甚至更多临床实验证明只要出现第2次翻红第2天都会有上涨2-5个点的机会成功率非常高!

通达信指标公式源码:

   
    {玉女散花选股}
    
    V2G:=(((CLOSE-REF(CLOSE,1))/REF(CLOSE,1))*100);
    V3G:=(MA(vol,2)/MA(VOL,10));
    V4G:=(VOL/CAPITAL);
    A1G:=((((0.0068*V2G)-(0.0072*V3G))-(0.5676*V4G))-0.0105);
    A2G:=((((0.0015*V2G)-(0.0124*V3G))+(1.7461*V4G))-0.0074);
    GGHX:=((((0-(12.2401*A1G))-(1*A2G))+0.321)<0);
    AA1:=MA(HHV(H,485),17);
    AA2:=MA(HHV(H,222),17);
    AA3:=MA(HHV(H,96),17);
    AA4:=MA(LLV(L,485),17);
    AA5:=MA(LLV(L,222),17);
    AA6:=MA(LLV(L,96),17);
    AA7:=MA((AA4*0.96+AA5*96+AA6*0.96+AA1*0.558+AA2*0.558+AA3*0.558)/6,17);
    AA8:=MA((AA4*1.25+AA5*1.23+AA6*1.2+AA1*0.55+AA2*0.55+AA3*0.65)/6,17);
    AA9:=MA((AA4*1.3+AA5*3+AA6*1.3+AA1*0.68+AA2*0.68+AA3*0.68)/6,17);
    AAA:=MA((AA7*3+AA8*2+AA9)/6*1.738,17);
    AAB:=IF(DATE<=1341231,AAA,AAA*DAY);
    AAC:=L;
    AAD:=REF(L,1);
    AAE:=SMA(ABS(AAC-AAD),3,1)/SMA(MAX(AAC-AAD,0),3,1)*100;
    AAF:=MA(IF(C*1.35<=AAB,AAE*10,AAE/10),3);
    AA10:=LLV(L,30);
    AA11:=HHV(AAF,30);
    AA12:=1341231;
    CM:=IF(DATE<=AA12,MA(IF(L<=AA10,(AAF+AA11*2)/2,0),3),100000000);
    AA13:=4*SMA((C-LLV(L,10))/(HHV(H,10)-LLV(L,10))*100,5,1)
    -3*SMA(SMA((C-LLV(L,10))/(HHV(H,10)-LLV(L,10))*100,5,1),3.2,1);
    BBGX:=CMANDCROSS(AA13,8);
    FGXG:=REF(C,2)/REF(C,1)>1.09ANDC/REF(C,1)>1.09ANDH=CANDV>REF(V,1);
    XG:BBGXANDGGHXANDFGXG;
    
    {macd背离及选股}
    
    MACD2:=2*(MACD.DIF-MACD.DEA);
    STICKLINE(MACD2>=0ANDMACD2>REF(MACD2,1),0,MACD2,1.2,0),COLOR0000A5;
    STICKLINE(MACD2>=0ANDMACD2<REF(MACD2,1),0,MACD2,1.2,0),COLORAA7800;
    STICKLINE(MACD2<0ANDMACD2<REF(MACD2,1),0,MACD2,1.2,0),COLOR00A500;
    STICKLINE(MACD2<0ANDMACD2>REF(MACD2,1),0,MACD2,1.2,0),COLORA500A5;
    DIF:EMA(CLOSE,12)-EMA(CLOSE,26);
    DEA:EMA(DIF,9);
    MACD:(DIF-DEA)*2,NODRAW;
    {MACD日线二次金叉}
    JCCOUNT:=COUNT(CROSS(DIF,DEA),BARSLAST(DEA>=0));
    二次金叉:=CROSS(DIF,DEA)ANDDEA<0ANDCOUNT(JCCOUNT=2,21)=1;
    DRAWTEXT(二次金叉,DEA*1.25,'零下二金'),COLORWHITE;
    {MACD日线底背离}
    A1:=BARSLAST(REF(CROSS(DIF,DEA),1));
    底背离:=REF(CLOSE,A1+1)>CLOSEANDDIF>REF(DIF,A1+1)ANDCROSS(DIF,DEA);
    DRAWTEXT(底背离,DIF*0.5,'日底背'),COLORRED;
    {日底背画线:DRAWLINE(A1=0,DEA,底背离,DEA,0),COLORRED,DOTLINE;}
    {MACD日线顶背离}
    A2:=BARSLAST(REF(CROSS(DEA,DIF),1));
    顶背离:=REF(CLOSE,A2+1)<CLOSEANDREF(DIF,A2+1)>DIFANDCROSS(DEA,DIF);
    DRAWTEXT(顶背离,DIF*1.12,'日顶背'),COLORGREEN;
    {日顶背画线:DRAWLINE(A2=0,DEA,顶背离,DEA,0),COLORGREEN,DOTLINE;}
    {MACD_KDJ的金叉共振}
    {DIF:EMA(CLOSE,12)-EMA(CLOSE,26);DEA:EMA(DIF,9);}
    RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9));
    K:=SMA(RSV,9,3),NODRAW;
    D:=SMA(K,9,3),NODRAW;
    J:=3*K-2*D,NODRAW;
    M&K金共:=CROSS(DIF,DEA)ANDCROSS(K,D)ANDCROSS(J,D);
    DRAWTEXT(M&K金共,DEA*1.12,'金叉共振'),COLORYELLOW;
    {MACD柱背离}
    MACD高:=HHV(MACD,5);
    C1:=BARSLAST(REF(CROSS(DEA,DIF),1));
    E:=REF(C,C1+1)>CANDDEA>0ANDREF(MACD高,C1+1)<MACD高ANDCROSS(DEA,DIF);
    DRAWTEXT(E>0,-0.5,'柱顶背'),COLORCYAN;
    F:=REF(C,A1+1)>CANDDEA<0ANDREF(MACD高,A1+1)<MACD高ANDCROSS(DIF,DEA);
    DRAWTEXT(F>0,0.5,'柱底背'),COLORLIRED;
    {MACD积背离}
    JC:=DEA-DIF;
    绿柱面积:=IF(MACD<0,SUM(MACD,BARSLAST(JC<0)),0);
    红柱面积:=IF(MACD>0,SUM(MACD,BARSLAST(JC>0)),0);
    本次最低价:=LLV(L,BARSLAST(JC<0));
    本次最高价:=HHV(H,BARSLAST(JC>0));
    X1:=IF(MACD<0,BARSLAST(CROSS(DIF,DEA)),0);
    前次绿柱面积:=REF(绿柱面积,X1+1);
    前次最低价:=REF(本次最低价,X1+1);
    Y1:=IF((绿柱面积<0ANDABS(绿柱面积)<ABS(前次绿柱面积)AND本次最低价<前次最低价),1,0);
    RS1:=MACD<0ANDREF(MACD,1)<0ANDC<前次最低价
    ANDABS(绿柱面积)<ABS(前次绿柱面积)ANDABS(MACD)<ABS(REF(MACD,1));
    底背驰:=IF(CROSS(DIF,DEA),REF(Y1,1),0);
    DRAWTEXT(底背驰,DEA*0.8,'积底背'),COLORFF80FF;
    X2:=IF(MACD>0,BARSLAST(CROSS(DEA,DIF)),0);
    前次红柱面积:=REF(红柱面积,X2+1);
    前次最高价:=REF(本次最高价,X2+1);
    Y2:=IF((红柱面积>0AND红柱面积<前次红柱面积AND本次最高价>前次最高价),1,0);
    RS2:=MACD>0ANDREF(MACD,1)>0ANDC>前次最高价ANDABS(红柱面积)<ABS(前次红柱面积)ANDABS(MACD)<ABS(REF(MACD,1));
    顶背驰:=IF(CROSS(DEA,DIF),REF(Y2,1),0);
    DRAWTEXT(顶背驰,DEA*0.8,'积顶背'),COLORCYAN;
    {}
    RC1:=REF(C,1);
    比前跌率:=(RC1-C)*100/RC1;
    长阴短柱:=比前跌率>4ANDABS(C-0)/C>0.03;
    长阴K:=C<0ANDC<0.9*MA(C,5)ANDABS((C-0))/C>0.03;
    长腿:=长阴KAND(MIN(C,0)-L)/(H-L)>=1/3AND比前跌率>=3;{4%可以自调}
    L0:=CONST(REF(L,BARSLAST(长腿>0)));
    WC:=0.024;
    JZL:=ABS(L0-L)<=WCORABS(L0-MIN(O,C))<=WCORABS(L0-H)<=WCORABS(L0-MAX(O,C))<=WC;
    长腿踩线:=COUNT(JZL,30)>=1;{60天内至少两次精准}
    缩倍:=V<=0.5*REF(V,1);
    XG1:=REF(长腿踩线,1)AND缩倍ANDCOUNT(长阴短柱,10);
    五日总涨幅:=SUM((C-REF(C,1))/REF(C,1)*100,5)<1;
    下影线:=(H-L)/L*100>5AND(MIN(O,C)-L)/L*100>5;
    单针探底:=五日总涨幅AND下影线;
    {三天内出现信号选出};{OR单针探底}
    XG:=COUNT(XG1,3)>1;
    盘:=CAPITAL/100;
    换:=V/盘;
    换手率:=BETWEEN(换,1.74,40);
    量比:=DYNAINFO(17)>1.7;
    流通盘:=CAPITAL/1000000<=2.85;
    股价:=C>=4.60ANDC<12.99;
    去创业板:=IF(CODELIKE('300'),0,1);
    去停牌:=DYNAINFO(17)>0;
    D22:=IF(NAMELIKE('S'),0,1);
    D33:=IF(NAMELIKE('*'),0,1);
    去ST:=D22ANDD33AND流通盘AND股价
    AND去创业板AND去停牌;
    缩倍OR长阴短柱ORJZLANDCOUNT(缩倍,3)>1AND去STAND量比AND换手率;
    
    {倍量收缩选股}
    
    RC1:=REF(C,1);
    比前跌率:=(RC1-C)*100/RC1;
    长阴短柱:=比前跌率>4ANDABS(C-0)/C>0.03;
    长阴K:=C<0ANDC<0.9*MA(C,5)ANDABS((C-0))/C>0.03;
    长腿:=长阴KAND(MIN(C,0)-L)/(H-L)>=1/3AND比前跌率>=3;{4%可以自调}
    L0:=CONST(REF(L,BARSLAST(长腿>0)));
    WC:=0.024;
    JZL:=ABS(L0-L)<=WCORABS(L0-MIN(O,C))<=WCORABS(L0-H)<=WCORABS(L0-MAX(O,C))<=WC;
    长腿踩线:=COUNT(JZL,30)>=1;{60天内至少两次精准}
    缩倍:=V<=0.5*REF(V,1);
    XG1:=REF(长腿踩线,1)AND缩倍ANDCOUNT(长阴短柱,10);
    五日总涨幅:=SUM((C-REF(C,1))/REF(C,1)*100,5)<1;
    下影线:=(H-L)/L*100>5AND(MIN(O,C)-L)/L*100>5;
    单针探底:=五日总涨幅AND下影线;
    {三天内出现信号选出};{OR单针探底}
    XG:=COUNT(XG1,3)>1;
    盘:=CAPITAL/100;
    换:=V/盘;
    换手率:=BETWEEN(换,1.74,40);
    量比:=DYNAINFO(17)>1.7;
    流通盘:=CAPITAL/1000000<=2.85;
    股价:=C>=4.60ANDC<12.99;
    去创业板:=IF(CODELIKE('300'),0,1);
    去停牌:=DYNAINFO(17)>0;
    D22:=IF(NAMELIKE('S'),0,1);
    D33:=IF(NAMELIKE('*'),0,1);
    去ST:=D22ANDD33AND流通盘AND股价
    AND去创业板AND去停牌;
    缩倍OR长阴短柱ORJZLANDCOUNT(缩倍,3)>1AND去STAND量比AND换手率;
    
    {双阴跳空洗盘选股}
    升势:=MA(C,10)>REF(MA(C,10),1);
    阳K:=C>=REF(C,1)*1.01;
    双阴:=COUNT(C<REF(C,1),2)=2;
    跳空:=MAX(C,O)<REF(MIN(C,O),1);
    缩量:=V<REF(V,2)ANDREF(V,1)<REF(V,2);
    XG:升势AND双阴AND跳空AND缩量ANDREF(阳K,2);
    
    {上线买入持有及选股}
    N:=38;
    M:=7;
    VAR1:=(HIGH+3*LOW+CLOSE)/5;
    VAR2:=Ema(VAR1,13)-EMA(VAR1,34);
    VAR3:=EMA(VAR2,5);
    VAR4:=(VAR2-VAR3)*5;
    VAR5:=IF(VAR4>=1000,1000,IF(VAR4<=VAR1,VAR1,VAR4));
    VAR6:=FORCAst(FORCAST(VAR5,N),M);
    VAR7:IF(VAR5>VAR6,VAR5,VAR6),COLORRED;
    VAR8:IF(VAR5<VAR6,VAR5,VAR6),COLORGREEN;
    VAR9:FORCAST(FORCAST(VAR5,N),M),LINETHICK1,COLORYELLOW,DOTLINE;
    {
    选股公式:
    N:=38;
    M:=7;
    VAR1:=(HIGH+3*LOW+CLOSE)/5;
    VAR2:=EMA(VAR1,13)-EMA(VAR1,34);
    VAR3:=EMA(VAR2,5);
    VAR4:=(VAR2-VAR3)*5;
    VAR5:=IF(VAR4>=1000,1000,IF(VAR4<=VAR1,VAR1,VAR4));
    VAR6:=FORCAST(FORCAST(VAR5,N),M);
    VAR7:=IF(VAR5>VAR6,VAR5,VAR6);
    XG:VAR7;
    }
    
    {高春牛组合选股}
    
    CAR1:=vol<ma(VOL,5)ANDMA(VOL,5)<MA(VOL,55);
    CAR2:=CLOSE/REF(CLOSE,1)>1.028;
    CAR3:=MA(CLOSE,10)>CLOSE*1.05;
    CAR4:=MA(CLOSE,10)<CLOSE*1.1;
    CAR5:=MA(CLOSE,60)>CLOSE*1.28;
    金牛:=CAR1ANDCAR2ANDCAR3ANDCAR4ANDCAR5;
    DIF1:=(CLOSE-SMA(CLOSE,7,1))/SMA(CLOSE,7,1)*(-100);
    DEA1:=REF(DIF1,1)>13ANDREF(DIF1,1)/DIF1>1.3ANDCLOSE/REF(CLOSE,1)>1.03;
    KOV:=IF(DEA1ANDREF(CLOSE,1)<=COst(5),28,0);
    PIC:=IF(DEA1ANDREF(CLOSE,1)<=COST(5),18,0);
    春笋:=IF(DEA1ANDREF(CLOSE,1)<=COST(5),1,0)ANDC<MA(C,60);
    VAR2:=(CLOSE-MA(CLOSE,6))/MA(CLOSE,6)*100;
    VAR3:=(CLOSE-MA(CLOSE,12))/MA(CLOSE,12)*100;
    VAR4:=(CLOSE-MA(CLOSE,24))/MA(CLOSE,24)*100;
    VAR5:=(VAR2+2*VAR3+3*VAR4)/6;
    VAR6:=MA(VAR5,3);
    D2:=VAR6<=-10;
    VAR11:=CLOSE/MA(CLOSE,30)*100<75;
    VAR12:=CLOSE/MA(CLOSE,50)*100<78;
    VAR13:=CLOSE/MA(CLOSE,70)*100<72;
    VAR14:=HIGH>LOW*1.053;
    VAR15:=VAR14ANDCOUNT(VAR14,5)>2;
    VAR16:=(VAR11ANDVAR12)OR(VAR12ANDVAR13)OR(VAR11ANDVAR13);
    D4:=VAR15ANDVAR16;
    高精:=D2ANDCOUNT(D4,3)>=1;
    XG:金牛AND春笋AND高精;
    
    {光波的预测选股}
    
    ZWDH:=(C-REF(C,1))/REF(C,1)*100;
    TJ1:=ZWDH!=LLV(ZWDH,3)ANDC=LLV(C,3)ANDC<OANDZWDH<REF(ZWDH,1)ANDC=LLV(C,3)ANDL=LLV(L,3)ANDC!=L;
    钝化级别:=Abs(REF(ZWDH,2))/ABS(ZWDH);
    XYB:=IF(C<O,(C-L)/(H-L),0);
    FZTJ:=C/REF(LLV(L,5),1)<0.99ANDXYB>0.1ANDXYB<0.4;
    X:=TJ1AND钝化级别>1.2ANDREF(ZWDH,1)-ZWDH>1ANDREF(ZWDH,2)<-8ANDC<REF(L,1)ANDFZTJ;
    XG:REF(X,1)ANDH/REF(C,1)>=1.01;
    
    {背驰回调买选股}
    
    下轨:=ma(REF(LLV(C,250),1),2);
    QS:=IF(C>REF(C,1),(2*CLOSE+2*HIGH+OPEN+LOW)/6,(2*OPEN+2*LOW+CLOSE+HIGH)/6);
    短线:=MA(SMA(QS,5,1),3);
    均角:=ATAN((短线/REF(短线,1)-1)*100)*180/3.14115926;
    A7:=C-REF(C,1);
    A8:=100*EMA(EMA(A7,6),6)/EMA(EMA(Abs(A7),6),6);
    买:=LLV(A8,2)=LLV(A8,7)ANDCOUNT(A8<0,2)ANDcrOSS(A8,MA(A8,2));
    rsi5:=((SMA(MAX((CLOSE-REF(CLOSE,1)),0),5,1)/SMA(ABS((CLOSE-REF(CLOSE,1))),5,1))*100);
    TR1:=SUM(MAX(MAX((HIGH-LOW),ABS((HIGH-REF(CLOSE,1)))),ABS((LOW-REF(CLOSE,1)))),10);
    HD:=(HIGH-REF(HIGH,1));
    LD:=(REF(LOW,1)-LOW);
    DMP:=SUM(IF(((HD>0)AND(HD>LD)),HD,0),10);
    DMM:=SUM(IF(((LD>0)AND(LD>HD)),LD,0),10);
    pdi:=((DMP*100)/TR1);
    mdi:=((DMM*100)/TR1);
    ADX:=MA(((ABS((MDI-PDI))/(MDI+PDI))*100),5);
    AV:=RSI5+ADX;
    wr10:=((100*(HHV(HIGH,10)-CLOSE))/(HHV(HIGH,10)-LLV(LOW,10)));
    NEWvol:=(RSI5-WR10);
    回调买:=AV+NEWVOL;
    背驰回调:CROSS(回调买,0)AND下轨<REF(下轨,1)AND买AND均角<-55ANDBARSCOUNT(CLOSE)>10ANDDYNAINFO(4)>0;
    
    {绝地金叉选股}
    
    RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
    K:=SMA(RSV,3,1);
    D:=Sma(K,3,1);
    J:=3*K-2*D;
    HH:=MAX(HIGH,REF(CLOSE,1));
    LL:=MIN(LOW,REF(CLOSE,1));
    AA:=SUM(CLOSE-LL,7)/SUM(HH-LL,7);
    BB:=SUM(CLOSE-LL,14)/SUM(HH-LL,14);
    CC:=SUM(CLOSE-LL,28)/SUM(HH-LL,28);
    UOS:=(AA/7+BB/14+CC/28)*7*14*28/(7*14+14*28+7*28)*100;
    MUOS:=EMA(UOS,6);
    选股:crOSS(J,D)ANDD<50ANDJ<20ANDCROSS(UOS,MUOS)ANDUOS>35;
    
    {智取妖底选股}
    
    A1:=((ma(C,60)-L)/MA(C,20))*200;
    B1:=((MA(C,60)-L)/MA(C,60))*200;
    C1:=((MA(C,30)-L)/MA(C,60))*200;
    M1:=REF(CLOSE,1);
    M2:=SMA(MAX(CLOSE-M1,0),7,1)/SMA(Abs(CLOSE-M1),7,1)*100;
    G1:=FILTER(REF(M2,1)<20ANDM2>REF(M2,1),5);
    TU:=C/MA(C,40)<0.74;
    PER1:=5;
    MMA:=EMA(C,PER1);
    SMMA:=EMA(MMA,PER1);
    IMPETMMA:=MMA-REF(MMA,1);
    IMPETSMMA:=SMMA-REF(SMMA,1);
    DIVMA:=ABS(MMA-SMMA);
    TDJ:=(H-L)/REF(C,1)>0.05;
    AVERIMPET:=(IMPETMMA+IMPETSMMA)/2;
    TDF:=POW(DIVMA,1)*POW(AVERIMPET,3);
    NTDF:=TDF/HHV(ABS(TDF),PER1*3);
    YUL:=COUNT(TDJ,5)>1;
    启动:=TUANDTDJANDYUL;
    确定:=crOSS(NTDF,-0.9);
    波段:=FILTER((G1ANDC1>20ORC>REF(C,1))ANDREF(启动,1),10);
    选股:=FILTER(REF(启动,1)AND(确定ORC>REF(C,1))AND"macd.MacD">-1.5,10);
    妖底:COUNT(选股,13)>=1AND波段;

声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。