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

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

授权方式: 免费版

指标评级: ★★★★★

指标分类: 策略

画线方法: 副图

一、通达信主力趋势指标公式

  

主力控盘  

N:=35;M:=35;N1:=3;  

B1:=(HHV(H,N)-C)/(HHV(H,N)-LLV(LOW,N))*100-M;  

B2:=SMA(B1,N,1)+100;  

B3:=(C-LLV(L,N))/(HHV(H,N)-LLV(L,N))*100;  

B4:=SMA(B3,3,1);  

B5:=SMA(B4,3,1)+100;  

B6:=B5-B2;  

控盘程度:(IF(B6>N1,B6-N1+2,0))*2.5,COLORYELLOW;  

控盘度:100,COLORRED;  

STICKLINE(控盘程度,0,控盘程度,1.7,0),COLOR00FFFF;  

STICKLINE(控盘程度AND控盘程度>100,100,控盘程  

度,1.7,0),COLORRED;主力状态  

ZLCM:=EMA(WINNER(CLOSE)*70,3);{//主力筹码估算}  

SHCM:=EMA((WINNER(CLOSE*1.1)-WINNER(CLOSE*0.9))*8  

0,3);{//散户筹码估算}  

ZSHTL:=SHCM/(ZLCM+SHCM)*100;{//散户套牢筹码比率}  

ZZLKP:=ZLCM/(ZLCM+SHCM)*100;{//主力控盘筹码比率}1/31/3  

ZCMZL:=MA(ZLCM+SHCM,13);{//市场筹码总量}  

ZZNTS:=BARSLAST(ZSHTL90);{//走牛天数}  

ZSHJJ:=EMA(ZSHTL,89);{//散户警戒}  

ZZLJJ:=EMA(ZZLKP,89);{//主力警戒}  

ZJLRQD:=INTPART(ZZLKP-ZZLJJ);{//资金流入强度}  

SH8:=EMA(ZSHTL,8);  

DKB:=IF(ZZLKP-REF(ZZLKP,1)>ZSHTL-REF(ZSHTL,1),1,0);  

{散户套牢筹码}  

STICKLINE(C>0,ZSHTL,ZZLKP,1,0),COLORFFFFFF;  

{散户筹码警戒}  

STICKLINE(ZSHJJ>REF(ZSHJJ,1),ZSHTL,ZSHJJ,2,0),COLOR00F  

F00;  

{主力控盘筹码}  

STICKLINE(C>0,ZZLKP,0,1,0),COLORA4A4A4;  

{筑顶风险区}  

STICKLINE(ZZLKP>75,ZZLKP,0,1,0),COLORFFFFFF;  

{顶部:(ZZLKP>75),COLORFFFFFF;}  

{主力筹码警戒}  

STICKLINE(ZZLJJ>REF(ZZLJJ,1),ZZLKP,ZZLJJ,2,0),COLORRED;  

{筑底散兵坑}  

STICKLINE(ZSHTL>=90,ZZLKP,0,2,0),COLOR66FFCC;  

{底部:(ZSHTL>=90),COLOR66FFCC;}  

{筹码总量上升}  

IF(ZCMZL,ZCMZL>REF(ZCMZL,1),0),COLOR0066FF,LINETHIC  

K1;  

{增量资金};  

{//——【数值显示】}  

散户套牢系数:INTPART(ZSHTL),COLORCYAN,LINETHICK2;  

主力控盘系数:INTPART(ZZLKP),COLORYELLOW,LINETHICK2;  

资金流入强度:ZJLRQD,LINETHICK2,COLORRED;  

资金流入强度  

2:IF(ZJLRQD<10,ZJLRQD,0),LINETHICK2,COLORWHITE;  

市场筹码总量:INTPART(ZCMZL),COLORWHITE,LINETHICK0;  

DRAWICON(CROSS(主力控盘系数,散户套牢系数),散户套牢  

系数-5,11);  

DRAWICON(CROSS(资金流入强度,散户套牢系数),散户套牢  

系数-5,17);

image.png

二、通达信经典主力强弱指标公式

 

N:=24;  

VAR1:=EMA(EMA(CLOSE,13),13);  

控盘指数:(VAR1-  

REF(VAR1,1))/REF(VAR1,1)*1000,POINTDOT,COLORFFCCCC;  

STICKLINE(控盘指数<0,控盘指数,0,2,0),COLORGRAY;  

无庄控盘:控盘指数<0,LINETHICK0,COLORGRAY;  

STICKLINE(控盘指数>REF(控盘指数,1)AND控盘指数>0AND  

控盘指数<3,控盘指数,0,2,1),COLORRED;  

STICKLINE(控盘指数>REF(控盘指数,1)AND控盘指数>0AND  

控盘指数>3,控盘指数,0,2,1),COLORRED;  

STICKLINE(控盘指数>REF(控盘指数,1)AND控盘指数>3,控盘指  

数,3,4,1),COLORFF00FF;  

主力控盘:控盘指数>REF(控盘指数,1)AND控盘指数>0,LINETHICK0,COLORRED;  

STICKLINE(控盘指数0,控盘指  

数,0,2,0),COLOR00FF00;  

控盘减弱:控盘指数0,LINETHICK0,COLOR00FF00;  

VARA:=EMA(0.667*REF(控盘指数,1)+0.333*控盘指数,2);  

STICKLINE(控盘指数>VARA,控盘指数,VARA,2,0),COLORRED;  

B2:=控盘指数>VARA;  

准备:B2>REF(B2,1)AND控盘指数<(-2),COLORYELLOW;  

DRAWTEXT(准备,3,'准备'),COLORYELLOW;  

B1:=(控盘指数>REF(控盘指数,1)AND控盘指数>0)=1;  

开始控盘:B1>REF(B1,1),COLORMAGENTA,LINETHICK3;  

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

X:=(20*A+19*REF(A,1)+18*REF(A,2)+17*REF(A,3)+16*REF(A,  

4)+15*REF(A,5)+  

14*REF(A,6)+13*REF(A,7)+12*REF(A,8)+11*REF(A,9)+10*REF  

(A,10)+9*REF(A,11)+8*REF(A,12)  

+7*REF(A,13)+6*REF(A,14)+5*REF(A,15)+4*REF(A,16)+3*RE  

F(A,17)+2*REF(A,18)+  

REF(A,20))/210;  

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

DX:=100*EMA(EMA(MTM,6),6)/EMA(EMA(ABS(MTM),6),6);  

CB:=EMA(X,13);  

买:=IF(LLV(DX,2)=LLV(DX,7)ANDCOUNT(DX<0,2)AND  

CROSS(DX,MA(DX,2)),1,0);  

DRAWICON(FILTER(买=1,5),L*0.11,1);  

DIFF:(EMA(CLOSE,12)  

EMA(CLOSE,26))*20,COLORWHITE,LINETHICK1;  

DEA:EMA(DIFF,9),COLORYELLOW,LINETHICK1;  

MACD:2*(DIFF-DEA),COLORSTICK;  

MACD1:=2*(DIFF-DEA),COLORRED,NODRAW;  

MACD2:=EMA(MACD1,3),COLORCYAN,NODRAW;  

STICKLINE(MACD1>MACD2  

MACD1>0,0,MACD1,2,0),COLORRED;  

STICKLINE(MACD1>MACD2  

MACD1<0,0,MACD1,2,0),COLORYELLOW;  

STICKLINE(MACD1<MACD2,0,MACD1,1,0),COLORGREEN;  

S1:=MACD<0;  

S2:=(MACD>=0);  

S3:=BARSLAST(CROSS(DIFF,DEA));  

S4:=REF(S3,S3+1);  

S5:=DEA>REF(DEA,S4);  

S6:=DEA;  

上成立:=CROSS(DIFF,DEA)ANDS5;  

下成立:=CROSS(DIFF,DEA)ANDS6;  

AND  

AND  

–  

L1:=(EMA(CLOSE,3)-EMA(CLOSE,13));  

L2:=EMA(L1,9);  

L3:=BARSLAST(CROSS(L1,L2));  

L4:=REF(L3,L3+1);  

L5:=L2;  

变盘:CROSS(L1,L2)ANDL5,NODRAW,COLORD6FF9C;  

STICKLINE(变盘,5,0,0,1),COLORD6FF9C;  

LS:=IF(DIFF>DEAANDDIFF>0,1,0);  

加速上扬:IF(REF(LS=0,1)ANDLS=1,0.1,0);  

XG1:CROSS(MACD1,MACD2)ANDMACD1<0,NODRAW;  

XG2:CROSS(DIFF,DEA),NODRAW;  

M1:=MACD>REF(MACD,1)ANDDIFF<DEA;  

绿柱短了:M1ANDCOUNT(M1,10)=1ANDC>MA(C,55)AND  

COUNT(MACD<0,5)>=5,NODRAW;  

DRAWTEXT(绿柱短了,MACD,'买点来了');  

DIFL:=EMA(V,12)-EMA(V,26);  

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

BL:=DIFL>REF(DIFL,1)ANDDIF<REF(DIF,1);  

四天:REF(BL,3)=1ANDREF(BL,2)=1ANDREF(BL,1)=1AND  

BL;  

三天:REF(BL,2)=1ANDREF(BL,1)=1ANDBL;  

{VERTLINE(上成立,3),COLORYELLOW;  

VERTLINE(下成立,3),COLORRED;}  

IF(DIFF>DEA,DIFF,DRAWNULL),COLORFF11CC,LINETHICK1;  

IF(DIFF>DEA  

DIFF<0,DIFF,DRAWNULL),COLORRED,LINETHICK1;  

RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;  

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

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

DRAWTEXT(FILTER(D>80,6),H*1.018,'D>80');  

AND  

DRAWTEXT(FILTER(CROSS(K,D)ANDD<26,6),H*0.95,'KD低  

金叉'),COLORFFCCCC;  

STICKLINE(FILTER(CROSS(K,D)  

D<26,6),H*0.97,H*0.95,4,0),COLORFFCCCC;  

DIFFF:=EMA(CLOSE,12)-EMA(CLOSE,26);  

DEAF:=EMA(DIFFF,9);  

MACDD:=2*(DIFFF-DEAF);  

DRAWTEXT(FILTER(CROSS(DIFFF,DEAF)ANDDEAF<0,6),L-  

0.02,'MACD低位金叉'),COLORRED;  

STICKLINE(FILTER(CROSS(DIFFF,DEAF)ANDDEAF<0,6),L-  

0.02,L-0.1,4,0),COLOR00FF00;  

DRAWTEXT(FILTER(CROSS(DIFFF,DEAF)  

DEAF>0,13),H+0.25,'MACD下拐点'),COLORYELLOW;  

STICKLINE(FILTER(CROSS(DIFFF,DEAF)  

DEAF>0,13),H+0.02,H+0.12,4,0),COLORBLUE;  

DRAWTEXT(FILTER(CROSS(MACDD,0),13),L*0.65,'MACD上拐  

点'),COLORRED;  

STICKLINE(FILTER(CROSS(MACDD,0),13),L*0.97,L*0.95,4,0),C  

OLORWHITE;  

ROC:=(CLOSE-REF(CLOSE,21))/REF(CLOSE,21)*100;  

DRAWTEXT(FILTER(CROSS(ROC,0),6),L-2.25,'骗线拐点  

'),COLORWHITE;  

STICKLINE(FILTER(CROSS(ROC,0),6),L-0.02,L-  

0.15,4,0),COLORFF00FF;

image.png

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