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

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

授权方式: 免费版

指标评级: ★★★★★

指标分类: 策略

画线方法: 副图

一、通达信机构买卖指标公式

  

DRAWRECTREL(0,0,285,999.2,IF(120,RGB(0,10,10),0));  

超B:=L2_AMO(0,2)/10000.0;  

⼤B:=L2_AMO(1,2)/10000.0;  

中B:=L2_AMO(2,2)/10000.0;  

⼩B:=L2_AMO(3,2)/10000.0;  

超S:=L2_AMO(0,3)/10000.0;  

⼤S:=L2_AMO(1,3)/10000.0;  

中S:=L2_AMO(2,3)/10000.0;  

⼩S:=L2_AMO(3,3)/10000.0;  

TESTSKIP(NOT(超BOR⼤BOR中BOR⼩BOR超SOR⼤SOR中SOR⼩S)!=0);  

净流⼊:(超B+⼤B+中B+⼩B)-(超S+⼤S+中S+⼩S),NODRAW;  

超⼤单:=(超B)-(超S);  

⼤单:=(⼤B)-(⼤S);  

中单:=(中B)-(中S);  

⼩单:=(⼩B)-(⼩S);  

DAZHI:=CONST(MAX(ABS(净流⼊),MAX(ABS(超⼤单),MAX(ABS(⼤单),MAX(ABS(中单),ABS(⼩单)))))),NODRAW;  

DRAWRECTREL(0,CONST(880-(ABS(净流⼊)*500/DAZHI)),50,930,IF(CONST(净流  

⼊)>0,RGB(255,0,0),RGB(23,125,255)));  

DRAWRECTREL(58,CONST(880-(ABS(超⼤单)*500/DAZHI)),108,930,IF(CONST(超⼤  

单)>0,RGB(102,0,204),RGB(23,125,255)));  

DRAWRECTREL(116,CONST(880-(ABS(⼤单)*500/DAZHI)),166,930,IF(CONST(⼤单)>0,RGB(255,0,0),RGB(23,125,255)));  

DRAWRECTREL(174,CONST(880-(ABS(中单)*500/DAZHI)),224,930,IF(CONST(中单)>0,RGB(255,0,0),RGB(23,125,255)));  

DRAWRECTREL(232,CONST(880-(ABS(⼩单)*500/DAZHI)),282,930,IF(CONST(⼩单)>0,RGB(255,0,0),RGB(0,128,0)));  

DRAWTEXT_FIX(CURRBARSCOUNT=1,0.002,1,0,'净流⼊'),COLORRED;  

DRAWTEXT_FIX(CURRBARSCOUNT=1,0.060,1,0,'超⼤单'),COLOR660099;  

DRAWTEXT_FIX(CURRBARSCOUNT=1,0.126,1,0,'⼤单'),COLORRED;  

DRAWTEXT_FIX(CURRBARSCOUNT=1,0.181,1,0,'中单'),COLORRED;  

DRAWTEXT_FIX(CURRBARSCOUNT=1,0.241,1,0,'⼩单'),COLORGREEN;  

{DRAWTEXT_FIX(CURRBARSCOUNT=1,0.0,0.001,0,'单位(万元)'),COLORYELLOW;}  

DRAWTEXT_FIX(CURRBARSCOUNT=1,0,0,0,'资⾦博弈今⽇分类持仓单位(万元)'),COLORYELLOW;  

{M:=0.53;M1:=0.33;}M:=0.58;M1:=0.39;  

DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.001,0.790,0,CEILING(净流⼊));  

DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.059,0.790,0,CEILING(超⼤单));  

DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.116,0.790,0,CEILING(⼤单));  

DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.175,0.790,0,CEILING(中单));  

DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.232,0.790,0,CEILING(⼩单));  

⼤宗进:=(超B)+(⼤B),NODRAW;  

⼤宗出:=(超S)+(⼤S),NODRAW;  

⾮⼤宗进:=(中B)+(⼩B),NODRAW;  

⾮⼤宗出:=(中S)+(⼩S),NODRAW;  

总流⼊⽐:=(超B+⼤B+中B+⼩B)/(超B+⼤B+中B+⼩B+超S+⼤S+中S+⼩S)*100,NODRAW;  

总流出⽐:=(超S+⼤S+中S+⼩S)/(超B+⼤B+中B+⼩B+超S+⼤S+中S+⼩S)*100,NODRAW;  

⼤宗进限制:=IF((超B+⼤B)=0,0,⼤宗进),NODRAW;  

⼤宗出限制:=IF((超S+⼤S)=0,0,⼤宗出),NODRAW;  

⾮⼤宗进限制:=IF(中B+⼩B=0,0,⾮⼤宗进),NODRAW;  

⾮⼤宗出限制:=IF(中S+⼩S=0,0,⾮⼤宗出),NODRAW;  

资⾦流向买:=⼤宗进限制+⾮⼤宗进限制;  

资⾦流向卖:=⼤宗出限制+⾮⼤宗出限制;  

流⼊⽐:=净流⼊*1000000/AMOUNT,NODRAW;  

⼤宗净流⼊:=(超B+⼤B)-(超S+⼤S),NODRAW;  

⼤宗流⼊⽐:=⼤宗净流⼊*1000000/AMOUNT,NODRAW;  

DRAWRECTREL(50,110,285,55,RGB(0,100,0));  

DRAWRECTREL(50,110,160,55,RGB(0,250,50));  

DRAWRECTREL(50,110,50+CONST(总流⼊⽐*160/100),55,RGB(175,50,250));  

DRAWTEXT_FIX(1,0.00,0.06,0,STRCAT(STRCAT('资⾦流向图',CON2STR(资⾦流向买,0)),'  

')),COLORYELLOW;  

DRAWTEXT_FIX(1,0.24,0.06,0,STRCAT(STRCAT('',CON2STR(资⾦流向卖,0)),'  

')),COLORYELLOW;  

⼤单流⼊:=(超B+⼤B)/(超B+⼤B+超S+⼤S)*100,NODRAW;  

⼤单流⼊限制:=IF((超B+⼤B+超S+⼤S)=0,0,⼤单流⼊);  

{⼤单流出⽐:=(超S+⼤S)/(超B+⼤B+超S+⼤S)*100,NODRAW;  

⼤单流出限制:=IF((超B+⼤B+超S+⼤S)=0,0,⼤单流出⽐);}  

⼤单买⽐:=LARGEINTRDVOL*100/(LARGEINTRDVOL+LARGEOUTTRDVOL),NODRAW;  

⼤单卖⽐:=LARGEOUTTRDVOL*100/(LARGEINTRDVOL+LARGEOUTTRDVOL),NODRAW;  

DRAWRECTREL(50,175,285,120,RGB(0,100,0));  

DRAWRECTREL(50,175,285,120,RGB(0,250,50));  

DRAWRECTREL(50,175,90+CONST(⼤单买⽐*160/100),120,RGB(200,0,50));  

DRAWTEXT_FIX(1,0.00,0.12,0,STRCAT(STRCAT('逐笔⼤单⽐',CON2STR(⼤单买⽐,0)),'  

')),COLORYELLOW;  

DRAWTEXT_FIX(1,0.24,0.12,0,STRCAT(STRCAT('',CON2STR(⼤单卖⽐,0)),'  

')),COLORYELLOW;  

成交总量:=(超B+⼤B+中B+⼩B+超S+⼤S+中S+⼩S),NODRAW;  

机构参与度:=(超B+超S+⼤B+⼤S)/成交总量*100,COLORYELLOW,NODRAW;  

DRAWRECTREL(50,240,285,191,RGB(0,250,50));  

DRAWRECTREL(50,240,285,191,RGB(200,0,50));  

DRAWRECTREL(50,240,50+CONST(⼤宗流⼊⽐*160/100),191,RGB(175,50,250));  

DRAWTEXT_FIX(1,0.27,0.19,1,STRCAT(STRCAT('机构介⼊度',CON2STR(⼤宗流⼊⽐,0)),'  

')),COLORYELLOW;  

DRAWRECTREL(50,305,285,255,RGB(200,0,50));  

DRAWRECTREL(50,305,160,255,RGB(200,0,50));  

DRAWRECTREL(50,305,50+CONST(流⼊⽐*160/100),255,RGB(175,50,250));  

DRAWTEXT_FIX(1,0.27,0.25,1,STRCAT(STRCAT('资⾦介⼊度',CON2STR(流⼊⽐,0)),'  

')),COLORYELLOW

image.png

二、通达信机构买入指标公式

  

STICKLINE(C>0,0,-1,4,0),COLOR885566;  

STICKLINE(C>0,-1,-2,4,0),COLORAA7766;  

STICKLINE(C>0,-2,-3,4,0),COLORCC9966;  

STICKLINE(C>0,-3,-4,4,0),COLOREE00BB;  

STICKLINE(C>0,0,1,4,0),COLOR220044;  

STICKLINE(C>0,1,2,4,0),COLOR440044;  

STICKLINE(C>0,2,3,4,0),COLOR660044;  

STICKLINE(C>0,3,4,4,0),COLOR00EE00;  

0;  

4;  

-4;  

{系统黑马指标}  

WRSI:=SMA(MAX(CLOSE-REF(CLOSE,1),0),6,1)/SMA(ABS(CLOSE-REF(CLOSE,1)),6,  

1)*100;  

相对强弱RSI买入:STICKLINE(CROSS(WRSI,20),3,4,2,0),LINETHICK2,COLORWHITE;  

{黄金坑买}  

KVAR1:=MA(WINNER(CLOSE),9)*100;  

坑买:=CROSS(KVAR1,2);  

KVAR2:=(1-EMA((HHV(HIGH,15)-CLOSE)/(HHV(HIGH,15)-LLV(LOW,15)),15))*100;  

KVAR3:=(CLOSE-LLV(LOW,21))/(HHV(HIGH,21)-LLV(LOW,21))*100;  

KVAR4:=SMA(KVAR3,9,1);  

KVAR5:=SMA(KVAR4,9,1);  

KVAR6:=(CLOSE-SMA(CLOSE,13,1))/SMA(CLOSE,13,1)*(-100);  

KVAR7:=REF(KVAR6,1)>13  

CLOSE/REF(CLOSE,1)>1.03;  

坑春笋:=KVAR7ANDREF(CLOSE,1)<=COST(5);  

KVAR8:=MA(CLOSE,27);  

KVAR9:=(CLOSE-KVAR8)/KVAR8*100;  

KVARA:=MA(KVAR9,2);  

KVARB:=BARSLAST(CROSS(-10,KVARA)=1);  

KVARC:=BARSLAST(CROSS(KVARA,10)=1);  

KVARD:=KVARA<-10andkvarb>3;  

KVARE:=KVARA>10ANDKVARC>3;  

ANDREF(KVAR6,1)/KVAR6>1.23AND  

黄金坑:=KVARD;  

坑贪嘴乐:=KVARA>REF(KVARA,1)ANDKVARDANDKVARA<-15;  

黄金坑买:STICKLINE((黄金坑+坑贪嘴乐+坑春笋+坑买)>=3,2,3,2,0),,COLORYELLOW;  

{“短线王”副图指标使用方法:  

1.使用及简单,出现白色三角图即可以下手,下手要快。  

3.实践证明,个股出现买入指示前五日连续下跌时,买入获利成功率不到20%,如个股出现  

买入指示前三日连续下跌时,买入获利率正好相反,能达到95%以上。  

4.个股买入第二日跌幅超过2%即可以抛掉,实际我的接受范围是跌幅不超过3.5%-4%,具  

体因时因股而宜。}

TJ1:=(MIN(C,O)-L)/(H-L)>=0.5;  

TJ2:=L/MIN(C,O)<=0.99;  

TJ3:=(C-MA(C,30))/MA(C,30)*100<-3;  

TJ4:=C>O;  

短线王:STICKLINE(TJ1ANDTJ2ANDTJ3ANDTJ4,1,2,2,0),COLORRED;  

{买001}  

VAR1W:=(CLOSE-MA(CLOSE,21))/MA(CLOSE,21)*100;  

VAR2W:=(CLOSE-LLV(LOW,43))/(HHV(HIGH,43)-LLV(LOW,43))*100;  

VAR3W:=SMA(VAR2W,2,1);  

下:=SMA(VAR3W,2,1);  

无:=ABS(VAR1W),COLORGREEN;  

买001:STICKLINE(CROSS(下,无),0,1,2,0),COLORMAGENTA;  

{交易护驾}  

Z_1:=C-REF(C,1);  

空头:=EMA(EMA(Z_1,6),6)/EMA(EMA(ABS(Z_1),6),6)*20;  

多头:=(空头*2-FORCAST(空头,9));  

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

KK:=SMA(RSV,2,1);  

DD:=SMA(KK,2,1);  

JJ:=3*KK-2*DD;  

引力:=SMA(JJ,2,1)-SMA(JJ,3,1);  

JT_B1:=(O+L+H+C*3)/6;  

WMR:=(5*JT_B1+4*REF(JT_B1,1)+3*REF(JT_B1,2)+2*REF(JT_B1,3)+1*REF(JT_B1,4))  

/(5+4+3+2+1);  

JT_B2:=REVERSE(JT_B1)+2*WMR;  

JT_B3:=3*JT_B2-2*SMA(JT_B2,2,1);  

JTB4:=IF(BARSLAST(C>JT_B3),JT_B3,DRAWNULL);  

JT_B4:=IF(BARSLAST(C>JT_B3),JT_B3,REF(JTB4,1));  

JTB5:=IF(BARSLAST(C<=JT_B3),JT_B3,DRAWNULL);  

JT_B5:=IF(BARSLAST(C<=JT_B3),JT_B3,REF(JTB5,1));  

JT_B6:=IF(C<=JT_B3,JT_B4,JT_B5);  

近台比:=(C-JT_B6)/JT_B6*100;  

交易护驾:STICKLINE(近台比>0ANDEVERY(近台比>REF(近台比,1),2)AND多头>=空头  

ANDCROSS(引力,0),-1,0,2,0),COLORBLUE;  

{短线买点}  

AA:=REF(CLOSE,1);  

BBB:=SMA(MAX(CLOSE-AA,0),5,1)/SMA(ABS(CLOSE-AA),5,1)*1000;  

HHH:=BBB-LLV(BBB,10);  

SS:=(MA(HHH,2)*3+HHH*13)/16;  

短线买点:=IF(SS>13,MA(SS,2),SS)/6,COLOR00FF00;  

短线出击:STICKLINE(CROSS(短线买点,1)AND(短线买点<30),-2,-1,2,0),COLORGREEN;  

{乖离1}  

下跌:=(C-MA(C,30))/MA(C,30)*100<-7;  

乖离:=EMA(100*(C-LLV(LOW,37))/(HHV(H,37)-LLV(LOW,37)),3)*1;  

乖离1选股:STICKLINE(CROSS(乖离,10)AND下跌,-3,-2,2,0),COLORCYAN;  

{建仓买点}  

LC:=REF(CLOSE,1);  

RSI5:=((SMA(MAX((CLOSE-LC),0),5,1)/SMA(ABS((CLOSE-LC)),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);  

DXR:=(((ADX+REF(ADX,5))/2)+RSI5);  

WR10:=((100*(HHV(HIGH,10)-CLOSE))/(HHV(HIGH,10)-LLV(LOW,10)));  

NEWVOL:=(RSI5-WR10);  

最佳买入:=(AV+NEWVOL);  

买入选股:=IF(CROSS(最佳买入,0),4,0),STICK,COLOR00FFFF,LINETHICK2;  

VARA1:=SMA(买入选股,3,1);  

VARA2:=SMA(VARA1,3,1),COLOR0000FF;  

VARA3:=SMA(VARA2,3,1),COLOR00FFFF;  

建仓买点:STICKLINE(CROSS(VARA2,VARA3)AND(VARA2<40),-4,-3,2,0),COLORRED;

AA:=(WINNER((CLOSE+((CLOSE*15)/100)))*100);  

BB:=(WINNER((CLOSE+((CLOSE*0)/100)))*100);  

CC:=(AA-BB);  

DD:=((WINNER((CLOSE-((CLOSE*0.1)/100)))-WINNER((CLOSE-((CLOSE  

*15)/100))))*100);  

EE:=(((CC<3)AND(DD<0.5))AND(OPENL));  

A1:=DYNAINFO(6);  

A2:=IF((LOW>A1),0,IF((HIGH<A1),1,(((A1-LOW)+0.01)/((HIGH-LOW)  

+0.01))));  

A3:=(VOL/WINNER(LOW));  

A4:=REF(HHV(CLOSE,120),1);  

A5:=REF(LLV(CLOSE,120),1);  

A6:=((100*(CLOSE-A5))/(A4-A5));  

A7:=((A2>0)OR(A2=1));  

A8:=((A7AND((A3/REF(A3,3))>=3))AND(A6<80));  

A9:=(((REF(A8,1)ORREF(A8,2))ORREF(A8,3))ORREF(A8,4));  

A10:=(A8ANDA9);  

A11:=IF(FILTER(A8,3),5,0);  

A12:=IF((FILTER(A10,3)OREE),10,0);  

私募机构进场日:STICKLINE(A11,0,5,5,0),COLORFF7700;  

私募机构加仓日:STICKLINE(A12,0,15,5,0),COLORFF00FF;  

STICKLINE(A11,0,5,5,0),COLORFF7700;  

STICKLINE(A12,0,15,4.5,0),COLOR102099;  

DRAWTEXT(A11,8,'进场'),COLORFFFF00;  

DRAWTEXT(A12,17,'加仓'),COLORWHITE;  

VAR1:=((LLV(LOW,5)=LLV(LOW,45))AND(CLOSE>=(OPEN*1.04)));  

VAR2:=(CLOSE>((REF(HIGH,1)+REF(LOW,1))/2));  

立即买入:(VAR1ANDVAR2),STICK,LINETHICK2;  

VAR3:=REF(CLOSE,1);  

VAR4:=((SMA(MAX((CLOSE-VAR3),0),6,1)/SMA(ABS((CLOSE-VAR3)),6,1))  

*100);  

坚决卖出:CROSS(80,VAR4),STICK,LINETHICK2,COLORLIBLUE;  

DRAWICON(坚决卖出,1.1,2);  

DRAWICON(立即买入,1.1,1);  

VAR11:=CLOSE;  

VAR21:=REF(CLOSE,1);  

VAR31:=REF(CLOSE,2);  

VAR41:=(((VAR11>VAR21)AND(VAR11>VAR31))AND(VAR11>MA(CLOSE,3)));  

VAR51:=(((VAR11<VAR21)AND(VAR11<VAR31))AND(VAR11<MA(CLOSE,3)));  

VAR61:=LLV(CLOSE,20);  

(VAR41*(VAR11-(VAR61*0.95))),VOLSTICK;  

(VAR51*(VAR11-(VAR61*0.95))),STICK;;

image.png

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