通达信公式源码概况:
指标类别:通达信公式
授权方式: 免费版
指标评级: ★★★★★
指标分类: 策略
画线方法: 副图
一、通达信流动资金公式副图指标公式
{n:1,100,5};
JGV:=(L2_VOL(0,0)-L2_VOL(0,1))*VOL/10000000000;
DHV:=(L2_VOL(1,0)-L2_VOL(1,1))*VOL/10000000000;
ZHV:=(L2_VOL(2,0)-L2_VOL(2,1))*VOL/10000000000;
SHV:=(L2_VOL(3,0)-L2_VOL(3,1))*VOL/10000000000;
A:=JGV+DHV;
B:=SHV+ZHV;
NOTEXT供资金:=EMA(A,N)*N,COLORRED;
NOTEXT求资金:=EMA(B,N)*N,COLORGREEN;
供求资金:NOTEXT供资金-NOTEXT求资金,{NODRAW}COLORFF00FF;0;
VAR1:=MA(AMOUNT/10,10)/10000;
VAR2:=REF(VAR1,1);
STICKLINE(VAR1>VAR2ANDC>=O,VAR1,VAR2,8,0),colorred;
STICKLINE(VAR1>VAR2ANDC<O,VAR1,VAR2,8,0),colorgreen;
STICKLINE(VAR1<VAR2,VAR1,VAR2,8,0),COLORFF9900;
MS20:MA(VAR1,20),COLORFF9900;
STICKLINE(VAR1<MS20,VAR1,VAR2,8,0),colorgray;
MS30:MA(VAR1,30),colorgreen;
VAR1:=AMOUNT/VOL/100;
VAR2:=(3*HIGH+LOW+OPEN+2*CLOSE)/7;
金额:SUM(AMOUNT,34)/VAR1/100,LINETHICK0,Color9999FF;
VAR4:=DMA(VAR2,VOL/金额);
VAR5:=100*(C-VAR4)/VAR4;
强:(MA(VAR5,20)+STDP(VAR5,20)),COLORFF00FF,LINETHICK0;
弱:(MA(VAR5,20)-STDP(VAR5,20)),COLOR00FF00,LINETHICK0;
强弱线:(强+弱)/2,POINTDOT,ColorCD5A6A;
PARTLINE(强弱线,(强弱线>REF(强弱线,1))-1,rgb(0,255,0),1,rgb(255,0,0)),LINETHICK2,POINTDOT;
資金差:VAR5,LINETHICK2,color0045FF;
流入:CROSS(資金差,强弱线),LINETHICK0,COLORRED;
DRAWICON((CROSS(資金差,强弱线)),强弱线,9);
DD:=(資金差>REF(資金差,1));
趋向:cross(DD,0)and資金差<0and資金差>-26,LINETHICK0,COLOR00FF00;
DRAWICON((CROSS(dd,0))and資金差<-10,資金差,12);
N:=9;
MID:=SMA(AMOUNT/10,N,1)/10000;
MA0:=MA(MID,30);
MA1:=MA(MID,1);
A1:=MA1-MA0;
MA2:=MA(MID,2);
A2:=MA2-MA0;
MA3:=MA(MID,3);
A3:=MA3-MA0;
MA4:=MA(MID,4);
A4:=MA4-MA0;
MA5:=MA(MID,5);
A5:=MA5-MA0;
MA6:=MA(MID,6);
A6:=MA6-MA0;
MA7:=MA(MID,7);
A7:=MA7-MA0;
MA8:=MA(MID,8);
A8:=MA8-MA0;
MA9:=MA(MID,9);
A9:=MA9-MA0;
MA10:=MA(MID,10);
A10:=MA10-MA0;
MA11:=MA(MID,11);
A11:=MA11-MA0;
MA12:=MA(MID,12);
A12:=MA12-MA0;
MA13:=MA(MID,13);
A13:=MA13-MA0;
MA14:=MA(MID,14);
A14:=MA14-MA0;
MA15:=MA(MID,15);
A15:=MA15-MA0;
MA16:=MA(MID,16);
A16:=MA16-MA0;
MA17:=MA(MID,17);
A17:=MA17-MA0;
MA18:=MA(MID,18);
A18:=MA18-MA0;
MA19:=MA(MID,19);
A19:=MA19-MA0;
MA20:=MA(MID,20);
A20:=MA20-MA0;
MA21:=MA(MID,21);
A21:=MA21-MA0;
MA22:=MA(MID,22);
A22:=MA22-MA0;
MA23:=MA(MID,23);
A23:=MA23-MA0;
MA24:=MA(MID,24);
A24:=MA24-MA0;
MA25:=MA(MID,25);
A25:=MA25-MA0;
MA26:=MA(MID,26);
A26:=MA26-MA0;
MA27:=MA(MID,27);
A27:=MA27-MA0;
MA28:=MA(MID,28);
A28:=MA28-MA0;
MA29:=MA(MID,29);
A29:=MA29-MA0;
MA30:=MA(MID,30);
A30:=MA30-MA0;
MA31:=MA(MID,31);
A31:=MA31-MA0;
MA32:=MA(MID,32);
A32:=MA32-MA0;
MA33:=MA(MID,33);
A33:=MA33-MA0;
MA34:=MA(MID,34);
A34:=MA34-MA0;
MA35:=MA(MID,35);
A35:=MA35-MA0;
MA36:=MA(MID,36);
A36:=MA36-MA0;
MA37:=MA(MID,37);
A37:=MA37-MA0;
MA38:=MA(MID,38);
A38:=MA38-MA0;
MA39:=MA(MID,39);
A39:=MA39-MA0;
MA40:=MA(MID,40);
A40:=MA40-MA0;
{A1+A2+A3+A4+A5++A21+A22+A23+A24+A25+A26+A27+A28+A29+A30}
LC:(A6+A7+A8+A9+A10+A11+A12+A13+A14+A15+A16+A17+A18+A19+A20)/30,LINETHICK0,COLORYELLOW;
VAR1:=LC;
VAR2:=REF(LC,1);
VAR3:=VAR1>VAR2ANDREF(LC,1)<REF(LC,2);
VAR4:=VAR1<VAR2ANDREF(LC,1)>REF(LC,2);
均线发散:STICKLINE(VAR1>VAR2,LC,REF(LC,1),2,1),COLORRED;
均线粘合:STICKLINE(VAR1<VAR2,LC,REF(LC,1),2,1),COLORGREEN;
EMA5:MA(VAR1,5),COLOR666666;
EMA10:MA(VAR1,10),COLOR999999;
B1:=BARSLAST(MA20>REF(MA20,1));
DRAWTEXT(VAR3ANDMA20<REF(MA20,1)ANDCOUNT(VAR3,B1)=1,0.95*REF(LC,1),'1'),COLORYELLOW;
DRAWTEXT(VAR3ANDMA20<REF(MA20,1)ANDCOUNT(VAR3,B1)=2,0.95*REF(LC,1),'2'),COLORYELLOW;
DRAWTEXT(VAR3ANDMA20<REF(MA20,1)ANDCOUNT(VAR3,B1)=3,0.95*REF(LC,1),'3'),COLORYELLOW;
DRAWTEXT(VAR3ANDMA20<REF(MA20,1)ANDCOUNT(VAR3,B1)=4,0.95*REF(LC,1),'4'),COLORYELLOW;
DRAWTEXT(VAR3ANDMA20<REF(MA20,1)ANDCOUNT(VAR3,B1)=5,0.95*REF(LC,1),'5'),COLORYELLOW;
B2:=BARSLAST(MA20<REF(MA20,1));
DRAWTEXT(VAR4ANDMA20>REF(MA20,1)ANDCOUNT(VAR4,B2)=1,1.05*REF(LC,1),'1');
DRAWTEXT(VAR4ANDMA20>REF(MA20,1)ANDCOUNT(VAR4,B2)=2,1.05*REF(LC,1),'2');
DRAWTEXT(VAR4ANDMA20>REF(MA20,1)ANDCOUNT(VAR4,B2)=3,1.05*REF(LC,1),'3');
DRAWTEXT(VAR4ANDMA20>REF(MA20,1)ANDCOUNT(VAR4,B2)=4,1.05*REF(LC,1),'4');
MACD:=(EMA5-EMA10)*2,COLORSTICK;
{此段为MACD柱变色}
{STICKLINE(((MACD>REF(MACD,1))AND(MACD>0)),0,MACD,0,0),COLOR0000BB;
STICKLINE(((MACD<REF(MACD,1))AND(MACD>0)),0,MACD,0,0),COLORLIGREEN;
STICKLINE(((MACD>REF(MACD,1))AND(MACD<0)),0,MACD,0,0),COLORFFFF00;
攻击流量:=((HSL*0.55+(REF(HSL,1)*0.33))+(REF(HSL,2)*0.22));
STICKLINE(HSL*0.4>=0,HSL*0.4*1.5,0,1,0),COLOR808080;
STICKLINE(HSL*0.4<0,HSL*0.4*1.5,0,1,0),COLOR808080;
GJJ:=EMA(攻击流量,8);
LLJX:=EMA(攻击流量,3);
资金流量:LLJX,LINETHICK0,COLOR0000FF;
STICKLINE(资金流量>0,资金流量,0,3,0),COLOR0000FF;
STICKLINE(资金流量<0,资金流量,0,3,0),COLORFF0000;
资金流入:SUM(IF(C>REF(C,1),C*V,0),FROMOPEN),STICK,COLORRED;
资金流出:-SUM(IF(C<REF(C,1),C*V,0),FROMOPEN),STICK,COLOR00FF00;
资金差:资金流入+资金流出,COLORYELLOW;
BGTYU:=IF(DATE<=1150530,1,0);
GHYJKU:=BETWEEN((DCLOSE*BGTYU)/(SUM(AMOUNT,BARSCOUNT((DCLOSE*BGTYU)))/SUM(VOL*100,BARSCOUNT((DCLOSE*BGTYU)))),1.05,0.95);
VBNH:=IF(GHYJKU=0,MA((DCLOSE*BGTYU),BARSCOUNT((DCLOSE*BGTYU))),(SUM(AMOUNT,BARSCOUNT((DCLOSE*BGTYU)))/SUM(VOL*100,BARSCOUNT((DCLOSE*BGTYU)))));
☆:EXPMA((DCLOSE/VBNH),20),COLORRED,LINETHICK1;
★:EXPMA((DCLOSE/VBNH),60),COLORLIGREEN,LINETHICK1;
DRAWICON(CROSS(EXPMA((DCLOSE/VBNH),60),EXPMA((DCLOSE/VBNH),120)),EXPMA((DCLOSE/VBNH),60)*1,1);
DRAWICON(CROSS(EXPMA((DCLOSE/VBNH),20),1.02),1.02+0.005,18);
[源码注释]通达信公式动态翻译结果
收盘价>1日前的上次金叉距今天数日前的收盘价 AND 金叉
每日通达信公式解答:
公式编写要求:
上个金叉比今天的金叉高的公式。
公式编写方法:
C>REF(REF(C,BARSLAST(金叉)),1) AND 金叉
评论(0)