通达信公式源码概况:
指标类别:通达信公式
授权方式: 免费版
指标评级: ★★★★★
指标分类: 策略
画线方法: 副图
一、通达信大资金流向指标公式源码
N:=5;QJ0:=(HIGH+LOW+CLOSE)/3;
QJ1:=IF(HIGH=LOW,1,HIGH-MAX(OPEN,CLOSE));
QJ2:=IF(HIGH=LOW,1,MAX(CLOSE,OPEN)-QJ0);
QJ3:=IF(HIGH=LOW,1,MIN(OPEN,CLOSE)-LOW);
QJ4:=IF(HIGH=LOW,1,QJ0-MIN(CLOSE,OPEN));
QJ5:=VOL/(IF(HIGH=LOW,4,HIGH-LOW));
QJ6:="MACD.DIF">"MACD.DEA"AND"MACD.DEA"<0;
QJ7:="KDJ.K">"KDJ.D"AND"KDJ.D"<30;
QJ8:="MACD.DIF"<"MACD.DEA";
QJ9:="KDJ.K"<"KDJ.D"AND"KDJ.K">80;
特大:QJ4*QJ5,NODRAW;大单:QJ3*QJ5,NODRAW;
中单:QJ1*QJ5,NODRAW;小单:QJ2*QJ5,NODRAW;
W1:=SUM(大单,N)+SUM(特大,N);W2:=SUM(小单,N)+SUM(中单,N);
量振1:=特大>大单AND大单>小单;
量振2:=特大<小单AND大单<小单;
标振1:=QJ6ANDQJ7;
标振2:=QJ8ANDQJ9;
A:=W1-W2;A0:=IF(A>0,A,0);B0:=IF(A<0,A,0);
STICKLINE(A0,0,A0,3,0),COLOR000044;
STICKLINE(A0,0,A0,2.5,0),COLOR000088;
STICKLINE(A0,0,A0,1.5,0),COLOR0000AA;
STICKLINE(A0,0,A0,1,0),COLOR0000CC;
STICKLINE(B0,0,-B0,3,0),COLOR004400;
STICKLINE(B0,0,-B0,2.5,0),COLOR008800;
STICKLINE(B0,0,-B0,1.5,0),COLOR00AA00;
STICKLINE(B0,0,-B0,1,0),COLOR00CC00;
周趋势:MA(A,5),COLORFFFFFF;
平滑值:EMA(周趋势,5),COLOR00FFFF;
STICKLINE(标振1AND量振1AND周趋势>平滑值,0,A0,3,0),COLORYELLOW;
DRAWTEXT(标振1AND量振1AND周趋势>平滑值,A0,'买入'),COLORYELLOW;
ZC_1:=IF(L<(7),0,IF(H>(7),(7)-((7)-H+0.02)/(H-L+0.02),0));
ZC_2:=DMA(ZC_1,V)*100;
出货:=IF(ZC_2>0ANDZC_2>REF(ZC_2,1),ZC_2/20,0);
轴:0,COLOR00FF00;
PJJ:=DMA((H+L+C*2)/4,0.9);
JJ:=REF(EMA(PJJ,3),1);
QJJ:=VOL/((H-L)*2-ABS(C-O));
XVL:=IF(C>O,QJJ*(H-L),IF(C<O,QJJ*(H-O+(C-L)),VOL/2))+IF(C>O,0-QJJ*(H-C+(O-L)),IF(C<O,0-QJJ*(H-L),0-VOL/2));
ZLL:=VOL;
HSL1:=IF(ZLL>10,10,ZLL);
HSL:=XVL/20/1.15;
攻击流量:=HSL*0.55+REF(HSL,1)*0.33+REF(HSL,2)*0.22;
GJJ:=EMA(攻击流量,8);
LLJX:=EMA(攻击流量,3);
流量:LLJX,COLORC875B7,COLORRED,NODRAW;
STICKLINE(流量>0,流量,0,2.3,0)COLOR0000FF;
STICKLINE(流量<0,流量,0,2.3,0),COLORFF4242;
流量基线:GJJ,COLOR00BBBB,COLORGREEN,LINETHICK2;
STICKLINE(HSL*0.4>=0,HSL*0.4*1.5,0,0,1)COLORYELLOW;
STICKLINE(HSL*0.4<0,HSL*0.4*1.5,0,0,1)COLORGREEN;
ZJLL:=REF(LLJX,1);
QZJJ:=(((LLJX-ZJLL)/ZJLL)*100);
流量幅%:IF(((LLJX>0)AND(ZJLL<0)),ABS(QZJJ),IF((((LLJX<0)AND(ZJLL<0))AND(LLJX<ZJLL)),(0-QZJJ),QZJJ))COLORMAGENTA,NODRAW;
力度:HSL/1000,COLOR9B37FF,COLORRED,NODRAW;
周流量:SUM(LLJX,5),COLORFFBFDF,COLORMAGENTA,NODRAW;
BB:=REF(周流量,1);
ZQZJJ:=(周流量-BB)/BB*100;
周幅%:IF(周流量>0ANDBB<0,ABS(ZQZJJ),IF(周流量<0ANDBB<0AND周流量<BB,-ZQZJJ,ZQZJJ))COLORMAGENTA,NODRAW;
VARQ1:=REF((LOW+OPEN+CLOSE+HIGH)/4,1);
VARQ2:=SMA(ABS(LOW-VARQ1),13,1)/SMA(MAX(LOW-VARQ1,0),10,1);
VARQ3:=EMA(VARQ2,10);
VARQ4:=LLV(LOW,33);
VARQ5:=EMA(IF(LOW<=VARQ4,VARQ3,0),3)*100;
主力进场:STICKLINE(VARQ5>REF(VARQ5,1)AND出货<=0,0,VARQ5,7,0),COLOR00FFFF;
EPSL:=0.0001;
ZZ:=(C+H+L)/3;
TJ0:=ZZ>MAX(C,O)ORZZ<MIN(C,O);
TJ1:=H=LANDC>REF(C,1);
TJ2:=H=LANDC<REF(C,1);
V0L:=IF(1,V,AMOUNT);
ZL:=2*(H-L)+ABS(C-O)+3*EPSL;
EE:=IF(TJ1,EPSL,IF(TJ2,-EPSL,0));
JGL_DTC:=(IF(TJ0AND1,4/3*(C-(H+L)/2)+ABS(C-O),C-OPEN)+EE)/ZL;
主动买:=V0L*(1+JGL_DTC)/2;
主动卖:=V0L*(1-JGL_DTC)/2;
买卖差:=主动买-主动卖;
JDZ:=ABS(买卖差);
占比:ABS(买卖差/MA(买卖差,20));
STICKLINE(买卖差>0,0,买卖差,8.10,0),COLOR0000CC;
STICKLINE(买卖差<0,0,买卖差,8.10,0),COLORGREEN;
资金异动:VOL/MA(VOL,55)*100,COLORYELLOW;
STICKLINE(资金异动>100,0,买卖差,2.9,1),COLORYELLOW;
[源码注释]通达信公式动态翻译结果
输出XG:成交量(手)<上次30日内成交量(手)的最高值=成交量(手)距今天数日前的成交量(手)*0.4
每日通达信公式解答:
公式编写要求:
当天成交量小于前30天中最大单日成交量40%的选股公式。
公式编写方法:
XG:V<REF(V,BARSLAST(HHV(V,30)=V))*0.4;
评论(0)