通达信公式源码概况:

指标类别:通达信公式

授权方式: 免费版

指标评级: ★★★★★

指标分类: 策略

画线方法: 副图

一、通达信金蜘蛛主图选股指标公式

  

RSV:=(((C-LLV(L,9))/(HHV(H,9)-LLV(L,9)))*100);  

K:=SMA(RSV,3,1);  

D:=SMA(K,3,1);  

J:=((3*K)-(2*D));  

DIFF:=(EMA(C,12)-EMA(C,26));  

DEA:=EMA(DIFF,9);  

MACD2:=(2*(DIFF-DEA));  

DIF:=DIFF;  

MACD:=DEA;  

DEF:=MACD2;  

CA1:=REF(C,1)>REF(O,1);  

CA2:=O>=(REF(C,1)+REF(O,1))/2ANDREF(C,1)>=O;  

CA3:=C>(REF(C,1)+REF(O,1))/2;  

CA:=CA1ANDCA2ANDCA3;  

CB1:=REF(C,1)<REF(O,1);  

CB2:=C>O;CB:=CA2ANDCB1ANDCB2;  

CC1:=(REF(C,1)+REF(O,1))/2>=OANDO>=REF(C,1);  

CC2:=(REF(C,1)+REF(O,1))/2>=C;  

CC:=CB1ANDCC1ANDCC2;  

CD1:=(REF(C,1)+REF(O,1))/2>=O;  

CD2:=O>=C;  

CD:=CA1ANDCD1ANDCD2;  

CE:=ABS((C-REF(C,1))/REF(C,1)*100)<3;  

EB1:=(CAORCBORCCORCD)ANDCE;  

CF:=BARSLAST(EB1);  

EB2:=IF(REF(C,CF)>REF(O,CF),REF(O,CF),REF(C,CF));  

EA1:=C>O;EA2:=C-MIN(MIN(REF(C,1),REF(O,1)),O);  

EA3:=EA2/ABS(EB2-REF(C,1))*100>50;EA4:=J>REF(J,1);  

EA5:=MAX(REF(C,2),REF(O,2))>MIN(O,MIN(REF(C,1),REF(O,1)));  

EA6:=(DEF>REF(DEF,1)ORDEF>0)AND(MACD>REF(MACD,1)ORDIF>REF(DIF,1));  

买进:EA1ANDEA3ANDEA4ANDEA5ANDEA6;  

均价:=(2*C+(C+H+L+O)/4+O)/4;  

R:=(2*L+3*均价)/5;  

操盘线:(5*r+4*REF(r,1)+3*REF(r,2)+2*REF(r,3)+1*REF(r,4))/(5+4+3+2+1),COLORWHITE;  

DKX:(20*r+19*REF(r,1)+18*REF(r,2)+17*REF(r,3)+16*REF(r,4)+15*REF(r,5)+14*REF(r,6)+13*REF(r,7)+12*REF(r,8)+11*REF(r,9)+10*REF(r,10)+9*REF(r,11)  

+8*REF(r,12)+7*REF(r,13)+6*REF(r,14)+5*REF(r,15)+4*REF(r,16)+3*REF(r,17)  

+2*REF(r,18)+REF(r,20))/210,COLORRED;  

差:=((c-REF(c,1))*0.382+(C-O)*0.618)*0.382;  

均价:=(2*C+(C+H+L+O)/4+O)/4;  

R:=(2*L+3*均价)/5;R1:=(2*H+3*均价)/5;  

CCI:=((R+R1)/2-MA((R+R1)/2,36))/(0.015*AVEDEV((R+R1)/2,36))/4+50;  

DRAWGBK(CCI>=25ANDCCI<50,COLORRGB(30,30,30),COLORRGB(130,130,130),1);  

DRAWGBK(CCI>=25ANDCCI>REF(CCI,1),COLORRGB(110,95,0),COLORRGB(0,20,0),1);  

DRAWGBK(CCI>=50,COLORRGB(110,0,0),COLORRGB(0,0,0),0);  

DRAWGBK(CCI>=50ANDCCI<REF(CCI,1),COLORRGB(20,50,50),COLORRGB(30,30,140),1);  

DRAWGBK(CCI<25,COLORRGB(0,110,0),COLORRGB(0,0,0),0);  

M3:=EMA((R+r1)/2,3);  

M5:=EMA((R+r1)/2,5);  

M8:=EMA((R+r1)/2,8),COLORWHITE;  

M13:=EMA((R+r1)/2,13);  

M21:=EMA((R+r1)/2,21),COLORYELLOW;  

M34:=EMA((R+r1)/2,34);  

M55:=EMA((R+r1)/2,55);  

M89:=EMA((R+r1)/2,89);  

M144:=EMA((R+r1)/2,144);  

M233:=EMA((R+r1)/2,233);  

M377:=EMA((R+r1)/2,377);  

黄金线:Ema((M3+M5+M8+M13+M21+M34+M55)/7,(3+5+8+13+21+34+55)/7),COLORYELLOW,LINETHICK2;  

正黄金线:EMA(黄金线+(eMA((R+r1)/2,2)-黄金线),13),COLORAAAA00;  

FILLRGN(黄金线<正黄金线,黄金线,正黄金线),COLORBROWN;  

FILLRGN(黄金线>正黄金线,黄金线,正黄金线),COLOR00AA99,COLORBLUE;  

跟庄线:ma(LLV((R+R1)/2,2),3),COLORWHITE,LINETHICK1;  

PARTLINE(SUM((R+R1)/2,2)/2>跟庄线,跟庄线),COLORWHITE,LINETHICK2;  

价值线:Ema((M3+M5+M8+M13+M21+M34+M55+M89+M144+M233)/10,(3+5+8+13+21+34+55+89+144+233)/10),COLORRED,LINETHICK2;  

乾坤线:=EMA(价值线-(eMA((R+r1)/2,2)-价值线),3),COLORAAAA00;  

PARTLINE(价值线<乾坤线,价值线),COLORAAAA00,LINETHICK2;  

kX:=IF(STKTYPE=0,(R+R1)/2,AMOUNT/(v*100));  

STICKLINE(kX>=CLOSE,HIGH,LOW,0.2,0),colorFFCC00;  

STICKLINE(kX>=CLOSE,CLOSE,kX,8,0),colorFF9F68;  

STICKLINE(kX>=CLOSE,CLOSE,kX,7,0),colorFF9900;  

STICKLINE(kX>=CLOSE,CLOSE,kX,6,0),colorFFAA11;  

STICKLINE(kX>=CLOSE,CLOSE,kX,5,0),colorFFBB11;  

STICKLINE(kX>=CLOSE,CLOSE,kX,4,0),colorFFCC22;  

STICKLINE(kX>=CLOSE,CLOSE,kX,3,0),colorFFDD22;  

STICKLINE(kX>=CLOSE,CLOSE,kX,2,0),colorFFEE33;  

STICKLINE(kX>=CLOSE,CLOSE,kX,1,0),colorFFFF33;  

STICKLINE(C>kX,HIGH,LOW,0.2,0),colorFF;  

STICKLINE(CLOSE>kX,CLOSE,kX,8,0),colorCC;  

STICKLINE(CLOSE>kX,CLOSE,kX,7,0),color3300CC;  

STICKLINE(CLOSE>kX,CLOSE,kX,6,0),color33CC;  

STICKLINE(CLOSE>kX,CLOSE,kX,5,0),color6633CC;  

STICKLINE(CLOSE>kX,CLOSE,kX,4,0),color3333FF;  

STICKLINE(CLOSE>kX,CLOSE,kX,3,0),color6633FF;  

STICKLINE(CLOSE>kX,CLOSE,kX,2,0),color3366FF;  

STICKLINE(CLOSE>kX,CLOSE,kX,1,0),color6666FF;  

三分线:(3*操盘线+2*DKX)/5,COLORYELLOW;  

LXX:(3.618*DKX+1.382*MA(DKX,60))/5,COLORAAAA00,LINETHICK2;  

PARTLINE(R>LXX,LXX),COLORFFC0FF,LINETHICK2;

image.png

[源码注释]通达信公式动态翻译结果

输出XG:平滑异同平均的MACD>0上穿0.5 AND 最近3日存在(收盘价/1日前的收盘价-1)*100>5

每日通达信公式解答:

  

选股条件  

30天线连续3天上升、每天上升0.03元或以上的选股公式。  

编写源码  

COUNT(MA(C,30)>=REF(MA(C,30)+0.03,1),3)=3;


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