通达信公式源码概况:

指标类别:通达信公式

授权方式: 免费版

指标评级: ★★★★★

指标分类: 策略

画线方法: 副图

一、通达信主力资金净流入指标公式


  

TYP:=(HIGH+LOW+CLOSE)/3;  

CCI:=(TYP-MA(TYP,14))/(0.015*AVEDEV(TYP,14));  

CCI正1:EMA(EMA(EMA(CCI,2),2),2);  

CCI正2:EMA(EMA(EMA(CCI,3),2),2);  

VARB:=CLOSE>MA(CLOSE,30)ANDCLOSE<MA(CLOSE,30)*1.04;  

VARC:=MA(CLOSE,30)>REF(MA(CLOSE,30),1);  

VARD:=BARSLAST(CROSS(MA(CLOSE,5),MA(CLOSE,10)))<BARSLAST(CROSS(MA(CLOSE,10),MA(CLOSE,5)));  

VARE:=0-"MACD.DIFF"(7,21,3);  

VARF:=TROUGHBARS(3,15,1)<4;  

VAR10:=EMA(CLOSE,30)>REF(EMA(CLOSE,30),2);  

VAR11:=IF(VARF=1,50,0);  

DRAWTEXT(FILTER(VARF=1,3),-120,'▲▲底部买'),colorwite;  

VAR2:=REF(LOW,1);  

VAR3:=SMA(ABS(LOW-VAR2),3,1)/SMA(MAX(LOW-VAR2,0),3,1)*100;  

VAR4:=EMA(IF(CLOSE*1.3,VAR3*10,VAR3/10),3);  

VAR5:=LLV(LOW,30);  

VAR6:=HHV(VAR4,30);  

VAR7:=IF(MA(CLOSE,58),1,0);  

VAR8:=EMA(IF(LOW<=VAR5,(VAR4+VAR6*2)/2,0),3)/618*VAR7;  

VAR9:=IF(VAR8>100,100,VAR8);  

VAR3:=PEAKBARS(3,15,1)<10;  

VAR5:=IF(VAR3=1,2,0);  

顶:=IF(VAR5=2,2,0);  

顶A:=IF(顶>REF(顶,1),50,0),colorblue;  

DRAWTEXT(顶A=50,120,'▼▼顶部卖'),colorblue;  

VAR8:=VOL>2*MA(VOL,30);  

VARB:=CLOSE>MA(CLOSE,30)ANDCLOSE<MA(CLOSE,30)*1.04;  

VARC:=MA(CLOSE,30)>REF(MA(CLOSE,30),1);  

VARD:=BARSLAST(CROSS(MA(CLOSE,5),MA(CLOSE,10)))<BARSLAST(CROSS(MA(CLOSE,10),MA(CLOSE,5)));  

VARE:=0-"MACD.DIFF"(7,21,3);  

VARF:=TROUGHBARS(3,15,1)<4;  

VAR10:=EMA(CLOSE,30)>REF(EMA(CLOSE,30),2);  

VAR11:=IF(VARF=1,50,0);  

STICKLINE(FILTER(VARF=1,5),130,0,8,0),colorwite;  

DRAWTEXT(FILTER(VARF=1,3),10,'黑马'),colorwite;  

全买:(ZIG(3,35)>REF(ZIG(3,35),1)ANDREF(ZIG(3,35),1)<REF(ZIG(3,35),2))*100,STICK,colorred,LINETHICK6;  

DRAWTEXT(全买=100,100,'#全买'),colorred;  

全卖:(ZIG(3,35)<REF(ZIG(3,35),1)ANDREF(ZIG(3,35),1)>REF(ZIG(3,35),2))*100,STICK,colorgreen,LINETHICK6;  

DRAWTEXT(全卖=100,70,'全卖'),colorgreen;  

N:=5;  

C0:=(H+L+C)/3;  

a1:=HHV(C0,n);  

a2:=LLV(C0,n);  

a3:=a1-a2;  

a4:=EMA((C0-a2)/a3,2)*100;  

b1:=HHV(C0,4*n);  

b2:=LLV(C0,4*n);  

b3:=b1-b2;  

b4:=EMA((C0-b2)/b3,2)*100;  

C1:=HHV(C0,16*n);C2:=LLV(C0,16*n);C3:=C1-C2;  

C4:=EMA((C0-C2)/C3,2)*100;  

VARC:=(ZIG(3,6)>=REF(ZIG(3,6),1))AND(REF(ZIG(3,6),1)<=REF(ZIG(3,6),2))AND(REF(ZIG  

(3,6),2)<=REF(ZIG(3,6),3))AND(REF(ZIG(3,6),3)<=REF(ZIG(3,6),4));  

VARD:=(ZIG(3,6)<=REF(ZIG(3,6),1))AND(REF(ZIG(3,6),1)>=REF(ZIG(3,6),2))AND(REF(ZIG  

(3,6),2)>=REF(ZIG(3,6),3))AND(REF(ZIG(3,6),3)>=REF(ZIG(3,6),4));  

DRAWTEXT((VARC=1),(15),'★超级短买'),Color0000FF;  

DRAWTEXT((VARD=1),88,'★超级短卖'),Color00FF00;  

VAR8:=VOL>2*MA(VOL,30);  

VARB:=CLOSE>MA(CLOSE,30)ANDCLOSE<MA(CLOSE,30)*1.04;  

VARC:=MA(CLOSE,30)>REF(MA(CLOSE,30),1);  

VARD:=BARSLAST(CROSS(MA(CLOSE,5),MA(CLOSE,10)))<BARSLAST(CROSS(MA(CLOSE,10),MA(CLOSE,5)));  

VARE:=0-"MACD.DIFF"(7,21,3);  

VARF:=TROUGHBARS(3,15,1)<4;  

VAR10:=EMA(CLOSE,30)>REF(EMA(CLOSE,30),2);  

VAR11:=IF(VARF=1,50,0);  

STICKLINE(FILTER(VARF=1,5),25,0,8,0),coloryellow;  

DRAWTEXT(FILTER(VARF=1,3),25,'大黑马★'),colorred;  

VAR1:=REF((LOW+OPEN+CLOSE+HIGH)/4,1);  

VAR2:=SMA(ABS(LOW-VAR1),13,1)/SMA(MAX(LOW-VAR1,0),10,1);  

VAR3:=EMA(VAR2,10);  

VAR4:=LLV(LOW,33);  

VAR5:=EMA(IF(LOW<=VAR4,VAR3,0),3);  

z:0,colorblack;  

主力进场:IF(VAR5>REF(VAR5,1),VAR5,0),colorred,NODRAW;  

洗盘:IF(VAR5<REF(VAR5,1),VAR5,0),colorgreen,NODRAW;  

STICKLINE(VAR5<REF(VAR5,1),0,VAR5,3,0),colorgreen;  

STICKLINE(VAR5>REF(VAR5,1),0,VAR5,3,0),COLOR000055;  

STICKLINE(VAR5>REF(VAR5,1),0,VAR5,2.6,0),COLOR000077;  

STICKLINE(VAR5>REF(VAR5,1),0,VAR5,2.1,0),COLOR000099;  

STICKLINE(VAR5>REF(VAR5,1),0,VAR5,1.5,0),COLOR0000BB;  

STICKLINE(VAR5>REF(VAR5,1),0,VAR5,0.9,0),COLOR0000DD;  

STICKLINE(VAR5>REF(VAR5,1),0,VAR5,0.3,0),COLOR0000FF;  

STICKLINE(VAR5<REF(VAR5,1),0,VAR5,3,0),COLOR005500;  

STICKLINE(VAR5<REF(VAR5,1),0,VAR5,2.6,0),COLOR007700;  

STICKLINE(VAR5<REF(VAR5,1),0,VAR5,2.1,0),COLOR009900;  

STICKLINE(VAR5<REF(VAR5,1),0,VAR5,1.5,0),COLOR00BB00;  

STICKLINE(VAR5<REF(VAR5,1),0,VAR5,0.9,0),COLOR00DD00;  

STICKLINE(VAR5<REF(VAR5,1),0,VAR5,0.3,0),COLOR00FF00;  

VAR21:=SMA(ABS(HIGH-VAR1),13,1)/SMA(MIN(HIGH-VAR1,0),10,1);  

VAR31:=EMA(VAR21,5);  

VAR41:=HHV(HIGH,11);  

VAR51:=EMA(IF(HIGH>=VAR41,VAR31,0),3);  

主力拉高:IF(VAR51<REF(VAR51,1),VAR51,0),coloryellow,NODRAW;  

STICKLINE(VAR51<REF(VAR51,1),0,VAR51,3,0),coloryellow;  

出货:IF(VAR51>REF(VAR51,1),VAR51,0),colorcyan,NODRAW;  

STICKLINE(VAR51>REF(VAR51,1),0,VAR51,3,0),colorcyan;  

VARC:=(ZIG(3,5)>REF(ZIG(3,5),1))AND(REF(ZIG(3,5),1)<=REF(ZIG(3,5),2))AND(REF(ZIG  

(3,5),2)<=REF(ZIG(3,5),3));  

VARD:=(ZIG(3,5)<REF(ZIG(3,5),1))AND(REF(ZIG(3,5),1)>=REF(ZIG(3,5),2))AND(REF(ZIG  

(3,5),2)>=REF(ZIG(3,5),3));  

DRAWTEXT((VARC=1),(-5),'△短买'),Color0000FF;  

DRAWTEXT((VARD=1),20,'▽短卖'),Color00FF00;  

VARE:=MA(100*(CLOSE-LLV(CLOSE,34))/(HHV(HIGH,34)-LLV(LOW,34)),5)-20;  

VARF:=100-3*SMA((CLOSE-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1)+2*SMA(SMA  

((CLOSE-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1),15,1);  

VAR10:=100-3*SMA((OPEN-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1)+2*SMA(SMA  

((OPEN-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1),15,1);  

VAR11:=VARF<REF(VAR10,1)ANDVOL>REF(VOL,1)ANDCLOSE>REF(CLOSE,1);  

DRAWTEXT(VAR11ANDCOUNT(VAR11,30)=1,50,'大资金'),LINETHICK1,COLORLIMAGENTA;  

STICKLINE(VAR11ANDCOUNT(VAR11,30)=1,1,60,5,0),COLORLIMAGENTA,LINETHICK4;  

V10:=PEAKBARS(3,15,1)<10;V12:=IF(V10=1,50,0);  

头部:=IF(V12=50,100,0);  

卖:IF(IF(V12=50,100,0)>REF(IF(V12=50,100,0),1),40,0),COLORGREEN,LINETHICK3;  

DRAWTEXT(卖,50,'主力清仓'),COLORGREEN;  

V9:=TROUGHBARS(3,15,1)<10;V11:=IF(V9=1,50,0);  

底部:=IF(V11=50,50,0);  

买:IF(底部>REF(底部,1),40,0),COLORRED,LINETHICK4;  

DRAWTEXT(买,50,'主力抄底'),COLORRED;  

CN1:=HHV(V,5);{5日最高量}  

CN2:=O&gt;C;  

CN02:=C&gt;O;  

CN03:=C=O;  

CN04:=((SUM(V,5)/CN1));  

CN05:=IF(CN04&gt;0.3,1,0);{大资金}  

CN06:=IF(CN2ANDCN05,V,0);{大资金流出}  

CN07:=IF(CN02ANDCN05,V,0);{大资金流入}  

CN08:=IF(CN03ANDCN05,V,0);{不明流向大资金}  

累积流入:SUM(CN07,9)/10000,COLORBLACK,LINETHICK1;  

累积流出:SUM(CN06,9)/10000,COLORBLACK,LINETHICK1;  

净流入:(累积流入-累积流出),COLORYELLOW,LINETHICK2;  

净流入角度:ATAN((净流入/REF(净流入,1)-1)*100)*57.3,NODRAW;  

VAR1:=LLV(LOW,21);  

VAR2:=HHV(HIGH,21);  

TX1:1,COLORBLUE,LINETHICK2;

image.png

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

输出XG:(收盘价/10日前的收盘价-1)*100>20

每日通达信公式解答:


公式编写要求:

近10日涨幅超过20%的选股公式。

公式编写方法:

XG:(C/REF(C,10)-1)*100>20;

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