相关简介:   通达信选股公式编写通达信选股公式大全                              

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

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

  授权方式:免费版

  指标评级:★★★★★

  指标分类:策略

  画线方法:副图/主图

通达信指标公式源码:


{红箭头主图和选股}

A:=MA(CLOSE,17)+ABS(MA(CLOSE,17)-REF(MA(CLOSE,17),1));
B:=MA(CLOSE,17)+MA(CLOSE,17)-REF(MA(CLOSE,17),1);
分水岭:IF(MA(CLOSE,17)<B,B,MA(CLOSE,17)),COLORFF00FF,LINETHICK2;
操作线:分水岭-(EMA(C,3)-分水岭),COLOR00FFFF,LINETHICK2;
PM:MA(C,5),COLORWHITE,LINETHICK2;
IF(PM>REF(PM,1),PM,DRAWNULL),COLORRED,LINETHICK2;
IF(PM=REF(PM,1),PM,DRAWNULL),COLORRED;
IF(PM<REF(PM,1),PM,DRAWNULL),COLORFF9900,LINETHICK2;
S:=(PM>操作线);
DD:=分水岭<REF(分水岭,1);
IF(DD,分水岭,DRAWNULL),COLOR00FF00,LINETHICK2;
IF(S,分水岭,DRAWNULL),COLOR00FF00,POINTDOT,LINETHICK4;
DRAWICON(CROSS(分水岭,操作线),分水岭-0.1,1);{买入红箭头}
A1:=BARSLAST(REF(CROSS("MACD.DIF","MACD.DEA"),1));
B1:=REF(C,A1+1)>C AND REF("MACD.DIF",A1+1)<"MACD.DIF" AND CROSS("MACD.DIF","MACD.DEA");
DRAWTEXT(B1>0,L-0.02,'★M'),COLOR00FFFF;{MACD底背离}
A2:=BARSLAST(REF(CROSS("kdj.K","KDJ.D"),1));
B2:=REF(C,A2+1)>C AND REF("KDJ.K",A2+1)<"KDJ.K" AND CROSS("KDJ.K","KDJ.D");
DRAWTEXT(B2,L-0.10,'◎K'),COLORFF00FF;{KDJ底背离}
A3:=BARSLAST(REF(CROSS("RSI.RSI1","RSI.RSI2"),1));
B3:=REF(C,A3+1)>C AND REF("RSI.RSI1",A3+1)<"RSI.RSI1" AND CROSS("RSI.RSI1","RSI.RSI2");
DRAWTEXT(B3>0,L-0.18,'◆R'),COLOR0000FF;{RSI底背离}
C1:=BARSLAST(REF(CROSS("MACD.DEA","MACD.DIF"),1));
D1:=REF(C,C1+1)<C AND REF("MACD.DIF",C1+1)>"MACD.DIF" AND CROSS("MACD.DEA","MACD.DIF");
DRAWTEXT(D1>0,H+0.16,'★M'),COLOR00FF00;{MACD顶背离}
C2:=BARSLAST(REF(CROSS("KDJ.D","KDJ.K"),1));
D2:=REF(C,C2+1)<C AND REF("KDJ.K",C2+1)>"KDJ.K" AND CROSS("KDJ.D","KDJ.K");
DRAWTEXT(D2>0,H+0.08,'◎K'),COLORFFFFCC;{KDJ顶背离}
C3:=BARSLAST(REF(CROSS("RSI.RSI2","RSI.RSI1"),1));
D3:=REF(C,C3+1)<C AND REF("RSI.RSI1",C3+1)>"RSI.RSI1" AND CROSS("RSI.RSI2","RSI.RSI1");
DRAWTEXT(D3>0,H+0.04,'◆R'),COLORFF9900;{RSI顶背离};

{乘风小量坑选股指标}

一字涨停:=(C-REF(C,1))/REF(C,1)>=0.95ANDH=LANDC=O;
一字跌停:=(REF(C,1)-C)/REF(C,1)<=-0.95ANDH=LANDC=O;
无一字板:=NOT(一字涨停OR一字跌停);
乘风小量坑:INTPART(MA(V,20)/10000)>=REF(INTPART(MA(V,20)/10000),1)*0.998ANDV<=MA(V,20)ANDMA(V,10)>MA(V,40)ANDMA(V,5)>MA(V,20)ANDMIN(C,O)<MA(C,5)ANDMA(C,5)>MA(C,10)
AND(MA(C,20)>=REF(MA(C,20),1)ORMA(C,10)>=REF(MA(C,10),1))ANDHHV(H,5)/L>1.1AND无一字板;

{小金边待涨选股}

A1:=CROSS(MA(C,5),MA(C,10)) AND MA(C,5)>MA(C,10);
A2:=BARSLAST(A1),NODRAW;
A3:={C<O AND} COUNT(MA(C,5)<REF(MA(C,5),1),A2)=1 AND MA(C,5)>MA(C,10) AND CROSS(C,MA(C,5)){,NODRAW};
A4:=BARSLAST(A3),NODRAW;
小金边待涨: (REF(A4,2)  OR REF(A4,3){OR A4}) AND CROSS(C,MA(C,5)) AND MA(C,5)>MA(C,10) ;

{捕捉起涨点选股}

角线:=(ATAN((ma(C,5)/REF(MA(C,5),1)-1)*100)*180/3.14115926);
角线MA:=MA(角线,5);
ANA:=PLOYLINE(crOSS(角线,角线MA),角线MA),COLORRED;
ANB:=PLOYLINE(CROSS(角线MA,角线),角线MA),COLORFF00FF;
角买点:=CROSS(角线,角线MA)AND((ANB>REF(ANB,1)ANDANB>ANAAND角线MA<=0)OR((角线MA<=-45ORCROSS(角线MA,-45))AND(ANB<-60ORLLV("kdj.J",3)<=-49)ANDANB>0)),
COLORGREEN;
角买入:=IF(角买点,1,0),COLORRED,LINETHICK2;
起涨点:COUNT(CROSS(角线,角线MA),ANA<REF(ANA,5)ANDANB>REF(ANB,5));

{阴线掘金选股}

真阴线:=C<=REF(C,1)ANDC<=O;
假阳线:=C<=REF(C,1)ANDC>=O;
阴线:=真阴线>0OR假阳线>0;
阴线天数:=BArslAst(阴线);
阴线实体最高价:=maX(REF(C,阴线天数),REF(O,阴线天数));
阴线成交量:=REF(V,阴线天数);
阳胜条件:=阴线天数>0ANDC>=阴线实体最高价ANDV>=阴线成交量;
阳胜:=IF(阳胜条件>0ANDREF(阳胜条件,1)=0,10,0);
真阳线:=C>=REF(C,1)ANDC>=O;
假阴线:=C>=REF(C,1)ANDC<=O;
阳线:=真阳线>0OR假阴线>0;
阳线天数:=BARSLAST(阳线);
阳线实体最低价:=MIN(REF(C,阳线天数),REF(O,阳线天数));
阳线成交量:=REF(V,阳线天数);
阴胜条件:=阳线天数>0ANDC<=阳线实体最低价ANDV>=阳线成交量*0.5;
阴胜:=IF(阴胜条件>0ANDREF(阴胜条件,1)=0,10,0),COLORWHITE;
ZTB:=C/REF(C,1)>1.099ANDDYNAINFO(10)>0;
REF(COUNT(ZTB,21)>=1AND阳胜,2)ANDDOWNNDAY(V,2);


{突破杀选股}

X_1:=12;
X_2:=26;
X_3:=9;
X_4:=ma(CLOSE,5);
X_5:=MA(CLOSE,10);
X_6:=MA(CLOSE,20);
X_7:=EMA(CLOSE,X_1)-EMA(CLOSE,X_2);
X_8:=EMA(X_7,X_3);
X_9:=(X_7-X_8)*2;
X_10:=MA(CLOSE,60);
X_11:=MA(CLOSE,120);
X_12:=X_4-REF(CLOSE,15);
X_13:=X_12/REF(CLOSE,15);
X_14:=CLOSE-REF(CLOSE,25);
X_15:=X_14/REF(CLOSE,25);
XG:REF(CLOSE,1)<REF(X_4,1)ANDX_4>REF(X_4,1)ANDX_4>X_5ANDX_5>X_6ANDOPEN<X_4ANDCLOSE>X_4ANDX_7>0.3ANDX_7>X_8ANDX_13>0.2ANDX_13<0.6ANDX_15<0.99;

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