通达信公式源码概况:
指标类别:通达信公式
授权方式: 免费版
指标评级: ★★★★★
指标分类: 策略
画线方法: 副图
一、通达信资金流指标公式
VOL,VOLSTICK;
VAR1:=VOL/((HIGH-LOW)*2-ABS(CLOSE-OPEN));
主买:IF(CLOSE>OPEN,VAR1*(HIGH-LOW),IF(CLOSE<OPEN,VAR1*((HIGH-OPEN)+(CLOSE-LOW)),VOL/2)),Color0055ff,LineThick0;
主卖:IF(CLOSE>OPEN,0-VAR1*((HIGH-CLOSE)+(OPEN-LOW)),IF(CLOSE<OPEN,0-VAR1*(HIGH-LOW),0-VOL/2)),Colorf0f000,LineThick0;
买卖差:主买+主卖,ColorWhite,LineThick0;
{红色3D}
STICKLINE(买卖差>0,0,买卖差,8,0),color070084;
STICKLINE(买卖差>0,0,买卖差,5,0),color0000CD;
STICKLINE(买卖差>0,0,买卖差,3,0),color0000E9;
STICKLINE(买卖差>0,0,买卖差,1,0),{color077BF3}ColorWhite;
{绿色3D}
STICKLINE(买卖差<0,0,买卖差,8,0),COLOR008800;
STICKLINE(买卖差<0,0,买卖差,5,0),COLOR00aa00;
STICKLINE(买卖差<0,0,买卖差,3,0),COLOR00cc00;
STICKLINE(买卖差<0,0,买卖差,1,0),{COLOR00ee00}ColorWhite;
0,ColorGray,LAYER1;
{虚拟成交量}
预测量:IF(DYNAINFO(7)=CLOSEANDDYNAINFO(10)=AMOUNT,MAX(VOL,DYNAINFO(17)*REF(MA(VOL,5),1)),0),ColorYellow;
STICKLINE(DYNAINFO(7)=CLOSEANDDYNAINFO(10)=AMOUNT,VOL,MAX(VOL,DYNAINFO(17)*REF(MA(VOL,5),1)),7.5,-21),ColorYellow;
a16:=VOL=(HHV(VOL,10));
IF(a16,VOL,(REF(VOL,BARSLAST(a16)))),DOTLINE,colorYellow;
A1:=amount*(bigorder(1,2)-bigorder(2,2))/10000;
A5:=sum(A1,5);
A10:=sum(A1,10);
A20:=sum(A1,20);
drawtextrel(0,10,'今日资金流入:'+numtostrn(A1,1)+'万'),colorwhite;
drawtextrel(0,50,'5日资金流入:'+numtostrn(A5,1)+'万'),colorgreen;
drawtextrel(0,90,'10日资金流入:'+numtostrn(A10,1)+'万'),coloryellow;
drawtextrel(0,130,'20日资金流入:'+numtostrn(A20,1)+'万'),colorred;
VAR1:=MA(((WINNER((CLOSE*0.9))*100)*CLOSE),3);
VAR2:=(IF((VAR1>10),VAR1,0)/2);
【资金比】:VAR2,LAYER1,PRECIS1,LINETHICK1,color67EAF6;
【资金均量】:MA(VAR2,5),LAYER1,PRECIS1,LINETHICK1,colorFF2C7A;
FILLRGN(VAR2,VAR2,0),colorCCCCCC;
FILLRGN(VAR2,【资金均量】,VAR2>【资金均量】,RGB(100,0,100));
VAR01:=REF(CLOSE,1);
VAR02:=((SUM(IF((CLOSE>VAR01),VOL,0),26)/SUM(IF((CLOSE<VAR01),VOL,0),26))*100);
A1:=EMA(VAR02,5);
D1:=EMA(A1,13);
D2:=REF(D1,2);
【资金股价比】:d1,PRECIS1,LINETHICK0,color0A9AFF;
【VR】:=A1;
【股价比】:A1,LAYER1,PRECIS1,LINETHICK1,color9000FF;
PARTLINE((【VR】<40),【VR】),LINETHICK2,colorFF9900;
PARTLINE(((【VR】>=40)AND(【VR】<80)),【VR】),LINETHICK2,colorCCFF66;
PARTLINE(((【VR】>=80)AND(【VR】<160)),【VR】),LINETHICK2,colorFFFFFF;
PARTLINE((【VR】>=160),【VR】),LINETHICK2,colorFF0000;
STICKLINE((D1>=REF(D1,1)),D1,D2,8,0),color0A9AFF;
STICKLINE((D1<REF(D1,1)),D1,D2,8,0),color0A9AFF;
STICKLINE((D1>=REF(D1,1)),D1,D2,5,0),color77CC00;
STICKLINE((D1>=REF(D1,1)),D1,D2,3,0),color99DD00;
STICKLINE((D1<REF(D1,1)),D1,D2,5,0),color990000;
STICKLINE((D1<REF(D1,1)),D1,D2,3,0),colorBB0000;
DRAWTEXT(((【VR】<40)AND(BARSTATUS=2)),【VR】,'底部区'),colorFF9900;
DRAWTEXT((((【VR】>=40)AND(【VR】<80))AND(BARSTATUS=2)),【VR】,'低位区'),colorCCFF66;
DRAWTEXT((((【VR】>=80)AND(【VR】<160))AND(BARSTATUS=2)),【VR】,'盘整区'),colorFFFFFF;
DRAWTEXT(((【VR】>=160)AND(BARSTATUS=2)),【VR】,'获利区'),color00FFFF;
DRAWTEXT((((VAR2>10)AND(【资金比】>【资金均量】))AND(BARSTATUS=2)),100,'有增量资金'),colorFF00FF;
DRAWTEXT(((((VAR2>10)AND(【资金比】<REF(【资金比】,1)))AND(【资金比】<【资金均量】))AND(BARSTATUS=2)),100,'存量资金减量'),colorFF99FF;
[源码注释]通达信公式动态翻译结果
上市的天数<=365*2并且收盘价>=250日前的收盘价并且收盘价<(收盘价,250)
每日通达信公式解答:
公式编写要求:
股上市两年内 250日均线走平或向上,股价在250日均线之下的选股公式。
公式编写方法:
FINANCE(42)<=365*2&&C>=REF(C,250)&&C<(C,250);
评论(0)