分时资金流量通达信指标 分时主图 源码附图
资金流入:=SUM(IF(C>REF(C,1),V,0),FROMOPEN),STICK,COLORRED;
资金流出:=-SUM(IF(C<REF(C,1),V,0),FROMOPEN),STICK,COLOR00FF00;
资金出入:=资金流入+资金流出,COLORSTICK;
资金流量:=资金出入,COLORFFFFFF,LINETHICK1;
资金比:=资金出入/SUM(V,FROMOPEN)*100,COLOR00FFFF,LINETHICK1;
资金流量比:=IF(资金比>=0,(资金比+100)/2,100-ABS((资金比-100)/2));
增强流量比:=IF(资金流量比>50,资金流量比,50);
攻击量:=((HSL*0.50+(REF(HSL,1)*0.33))+(REF(HSL,2)*0.17))*SUM(C,FROMOPEN)/FROMOPEN;
攻击量A:=SUM(IF(C>REF(C,1),攻击量*V,0),FROMOPEN),COLOR0000FF,LINETHICK0;
攻击量B:=-SUM(IF(C<REF(C,1),攻击量*V,0),FROMOPEN),COLOR00FF00,LINETHICK0;
攻击流量:=攻击量A+攻击量B,COLORSTICK;
NOTEXT攻击线:=攻击流量,COLORYELLOW,LINETHICK1;
攻击比:=攻击流量/SUM(V,FROMOPEN)*100,COLORRED,LINETHICK1;
资金攻击度:=IF(攻击比>0,(攻击比+50),100-ABS((攻击比-50)));
攻击度限制:=IF(资金攻击度>100,100,IF(资金攻击度<0,0,资金攻击度));
增强攻击度:=IF(资金攻击度>50,资金攻击度,50);
开始攻击:=CROSS(攻击流量,0) AND (C>REF(C,2) OR (资金流量>0 AND 资金流量>攻击流量));
开始攻击量:=CROSS(攻击流量,0) AND C>REF(C,2) AND V>LLV(V,3)*3;
Q:=250;
高点:=HHV(C,Q);
低点:=LLV(C,Q);
最高:=CONST(高点),NODRAW;
最低:=CONST(低点),NODRAW;
轴差:=最高-最低;
中价轴:=(最高+最低)/2;
HL3:=(100-0)/2*1.3;
HL4:=(100-0)/1*1.3;
中间价轴:=(50-HL3)*轴差/HL4+中价轴;
平安轴:=(中价轴+中间价轴)/2;
BGTYU:=IF(DATE<=1150530,1,0);
GHYJKU:=BETWEEN((CLOSE*BGTYU)/(SUM(AMOUNT,BARSCOUNT((CLOSE*BGTYU)))/SUM(VOL*100,BARSCOUNT((CLOSE*BGTYU)))),1.05,0.95);
VBNH:=IF(GHYJKU=0,MA((CLOSE*BGTYU),BARSCOUNT((CLOSE*BGTYU))),(SUM(AMOUNT,BARSCOUNT((CLOSE*BGTYU)))/SUM(VOL*100,BARSCOUNT((CLOSE*BGTYU)))));
起动线:=EXPMA((CLOSE/VBNH),20)*1,COLORYELLOW,POINTDOT;
主力线:=EXPMA((CLOSE/VBNH),60)*1,COLORMAGENTA,LINETHICK2;
散户线:=EXPMA((CLOSE/VBNH),120)*1,COLORGREEN,LINETHICK2;
限制起动线:=起动线*中间价轴;
限制主力线:=主力线*中间价轴;
限制散户线:=散户线*中间价轴;
主散MIN:=MIN(限制主力线,限制散户线);
{分时转强:=主散MIN>金龙线 AND ((LONGCROSS(限制主力线,金龙线,2) OR CROSS(限制主力线,限制散户线)) OR (限制主力线>限制散户线 AND LONGCROSS(牵引线,金龙线,2)));}
DRAWBAND(限制主力线,RGB(250,125,0),限制散户线,RGB(0,100,250));
STICKLINE(起动线<主力线,限制起动线,限制主力线,1.0,0),COLOR00FF00;
STICKLINE(起动线>主力线,限制起动线,限制主力线,1.0,0),COLORFFFFFF;
STICKLINE(VOL>EMA(VOL,60) AND 起动线>主力线,限制起动线,限制主力线,1,0),COLORFF00FF;
STICKLINE(VOL>EMA(VOL,30) AND 起动线>主力线 AND 起动线>1.01 AND 起动线>REF(起动线,1),限制起动线,限制主力线,1,0),COLOR00FFFF;
主力:限制主力线,COLORFFFFFF,LINETHICK1;
分时均价线:SUM(C*V,240)/SUM(V,240),COLORYELLOW,LINETHICK2;
追击涨停:=限制散户线>分时均价线 AND CROSS(C,限制散户线);
DRAWRECTREL(110,5,410,60,RGB(0,100,200));
DRAWRECTREL(110,5,260,60,RGB(0,250,50));
DRAWRECTREL(110,5,110+CONST(资金流量比*300/100),60,RGB(175,50,250));
DRAWRECTREL(260,23,260+CONST((增强流量比-50)*300/100),42,RGB(250,150,0));
DRAWTEXT_FIX(1,0.000,0.01,0,STRCAT(STRCAT('【资金流量比】',CON2STR(资金流量比,2)),'%买')),COLORYELLOW;
DRAWRECTREL(610,5,910,60,RGB(0,100,200));
DRAWRECTREL(610,5,760,60,RGB(0,250,50));
DRAWRECTREL(610,5,610+CONST(攻击度限制*300/100),60,RGB(175,50,250));
DRAWRECTREL(760,23,760+CONST((增强攻击度-50)*300/100),42,RGB(250,150,0));
DRAWTEXT_FIX(1,0.500,0.01,0,STRCAT(STRCAT('【资金攻击度】',CON2STR(资金攻击度,2)),' %买')),COLORYELLOW;
DRAWTEXT_FIX(C>0,0.004,0.085,0,DYBLOCK),COLORYELLOW,LINETHICK2;
DRAWTEXT_FIX(C>0,0.08,0.085,0,HYBLOCK),COLORRED,LINETHICK2;
DRAWTEXT_FIX(C>0,0.16,0.085,0,EXTERNSTR(0,1)),COLORWHITE,LINETHICK2;
拉升量:=IF(C>REF(C,1),VOL,0);
昨拉升最高值:=CONST(FINDHIGH(拉升量,FROMOPEN,240,1)),LINETHICK1,COLORMAGENTA;
今拉升最高值:=CONST(REF(HHV(拉升量,FROMOPEN),0)),COLORYELLOW,NODRAW;
攻击力度:=今拉升最高值/昨拉升最高值,NODRAW;
TT:=BARSCOUNT(C);{取得有效收盘价}
均价黄:=SUM(C*V,TT)/SUM(V,TT);{分时均线的取值}
量两步:=MA(V,5)>REF(MA(V,5),1) AND REF(MA(V,5),1)>REF(MA(V,5),2);
价两步:= C>=REF(C,1) AND REF(C,1)>REF(C,2);
价上岗量破5:=C>均价黄 AND V>MA(V,5);
量起爆:=V>=REF(V,1)*1 ;
价创新高:=C>=HHV(C,0);
量创新高:=V>=HHV(V,0);
对昨日涨幅:=(C/DYNAINFO(3)-1)*100<=2.50;{涨幅控制2个点以内}
每日一点:=量两步 AND 价两步 AND 价上岗量破5 AND 量起爆 AND 价创新高 AND 量创新高 AND 对昨日涨幅;
{计算收益、已爆分钟}
VV:=BARSSINCE(每日一点)+1;
首次起爆价:=REF(C,VV-1),NODRAW;
今天收益:=(DYNAINFO(7)-首次起爆价)/首次起爆价*100,NODRAW;
流通盘:=CAPITAL*100/100000000,NODRAW;
起爆时间:=REF(TIME/10000,VV),NODRAW;
已爆分钟:=VV-1,NODRAW;
{画出底线和红球}
首次起爆量:=REF(VOL,VV-1);
STICKLINE(FILTER(CROSS(拉升量,昨拉升最高值),30),最低+轴差*0.83,最低,1,0),COLORCYAN;
DRAWICON(FILTER(CROSS(拉升量,昨拉升最高值),30),最低+轴差*0.83,27);
DRAWTEXT(FILTER(CROSS(拉升量,昨拉升最高值),30),最低+轴差*0.83,'∠量突破'),COLORCYAN;
STICKLINE(FILTER(每日一点,30),最低+轴差*0.75,最低,1,0),COLORGREEN;
DRAWICON(FILTER(每日一点,30),最低+轴差*0.75,13);
DRAWTEXT(FILTER(每日一点,30),最低+轴差*0.75,'∠起爆'),COLORGREEN;
DRAWNUMBER(FILTER(每日一点,30),最低+(C-最低)/2,首次起爆价),COLORWHITE;
{DRAWTEXT_FIX(每日一点=1,0.00,0.10,0,'当起爆突破时:20线上行+日价K线突破+日K线量起爆更好+估换手小于10%更有效'),COLORMAGENTA;}
TA:=BARSLAST(TIME=100000);{股票指标网}
TC:=REF(HHV(C,0),TA+1);
TV:=REF(HHV(V,0),TA+1);
ZF:=C/DYNAINFO(3)<1.05;
XG1:=CROSS(C,TC) AND V>TV AND ZF,COLORWHITE;
TA1:=BARSLAST(TIME=110000);
CC1:=REF(HHV(C,0),TA1+1);
VV1:=REF(HHV(V,0),TA1+1);
ZF1:=CC1/DYNAINFO(3)<1.05;
XG2:=CROSS(C,CC1) AND V>VV1 AND ZF1,COLORYELLOW;
突破:=XG1 OR XG2,COLORRED;
STICKLINE(FILTER(突破=1,15),最低+轴差*0.60,最低,1,0),COLORWHITE;
DRAWICON(FILTER(突破=1,15),最低+轴差*0.60,17);
DRAWTEXT(FILTER(突破=1,15),最低+轴差*0.60,'∠分时突破'),COLORWHITE;
STICKLINE(FILTER(开始攻击量=1,15),最低+轴差*0.45,最低,1,0),COLORMAGENTA;
STICKLINE(FILTER(开始攻击=1,30),最低+轴差*0.30,最低,1,0),COLORYELLOW;
STICKLINE(CROSS(EXPMA((CLOSE/VBNH),60),EXPMA((CLOSE/VBNH),120)),最低+轴差*0.15,最低,1,0),COLORCYAN;
DRAWICON(FILTER(开始攻击量=1,15),最低+轴差*0.45,24);
DRAWICON(FILTER(开始攻击,30),最低+轴差*0.30,23);
DRAWTEXT(FILTER(开始攻击量=1,15),最低+轴差*0.45,'∠攻击量'),COLORMAGENTA;
DRAWTEXT(FILTER(开始攻击,30),最低+轴差*0.30,'开始攻击'),COLORYELLOW;
DRAWTEXT(FILTER(CROSS(EXPMA((CLOSE/VBNH),60),EXPMA((CLOSE/VBNH),120)),30),最低+轴差*0.15,'★迹'),COLORCYAN;
DRAWICON(FILTER(CROSS(起动线,1.01),30),限制散户线,17);
DRAWTEXT(FILTER(CROSS(起动线,1.01),30),最低,'可能涨停'),COLORMAGENTA;
DRAWTEXT(FILTER(追击涨停,30),分时均价线+(限制散户线-分时均价线)/2,'追击涨停'),COLORRED;
未来函数检测结果如下:
该公式包含未来函数:CAPITAL
该公式包含未来函数:DYNAINFO
该公式包含未来函数:DHIGH
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
资金流入赋值:SUM(IF(C>1日前的C,V,0),FROM开盘价),STICK,画红色
资金流出赋值:-SUM(IF(C<1日前的C,V,0),FROM开盘价),STICK,COLOR00FF00
资金出入赋值:资金流入+资金流出,COLORSTICK
资金流量赋值:资金出入,COLORFFFFFF,LINETHICK1
资金比赋值:资金出入/FROM开盘价的V日累和*100,COLOR00FFFF,LINETHICK1
资金流量比:=IF(资金比>=0,(资金比+100)/2,100-(资金比-100的绝对值/2))
如果资金流量比>50返回资金流量比否则返回50
攻击量赋值:((HSL*0.50+(1日前的HSL*0.33))+(2日前的HSL*0.17))*FROM开盘价的C日累和/FROM开盘价
攻击量A:=SUM(IF(C>1日前的C,攻击量*V,0),FROM开盘价),COLOR0000FF,LINETHICK0
攻击量B:=-SUM(IF(C<1日前的C,攻击量*V,0),FROM开盘价),COLOR00FF00,LINETHICK0
攻击流量赋值:攻击量A+攻击量B,COLORSTICK
NOTEXT攻击线赋值:攻击流量,画黄色,LINETHICK1
攻击比赋值:攻击流量/FROM开盘价的V日累和*100,画红色,LINETHICK1
资金攻击度赋值:IF(攻击比>0,(攻击比+50),100-(攻击比-50的绝对值))
攻击度限制赋值:IF(资金攻击度>100,100,IF(资金攻击度<0,0,资金攻击度))
如果资金攻击度>50返回资金攻击度否则返回50
开始攻击赋值:攻击流量上穿0 AND (C>2日前的C OR (资金流量>0 AND 资金流量>攻击流量))
开始攻击量赋值:攻击流量上穿0 AND C>2日前的C AND V>3日内V最低值*3
Q赋值:250
高点赋值:Q日内C最高值
低点赋值:Q日内C最低值
最高赋值:CONST(高点),NODRAW
最低赋值:CONST(低点),NODRAW
轴差赋值:最高-最低
中价轴赋值:(最高+最低)/2
HL3赋值:(100-0)/2*1.3
HL4赋值:(100-0)/1*1.3
中间价轴赋值:(50-HL3)*轴差/HL4+中价轴
平安轴赋值:(中价轴+中间价轴)/2
如果DATE<=1150530返回1否则返回0
GHYJKU赋值:BETWEEN((收盘价*BGTYU)/(SUM(成交额,(收盘价*BGTYU的有效数据周期数))/SUM(成交量*100,(收盘价*BGTYU的有效数据周期数))),1.05,0.95)
VBNH赋值:IF(GHYJKU=0,MA((收盘价*BGTYU),(收盘价*BGTYU的有效数据周期数)),(SUM(成交额,(收盘价*BGTYU的有效数据周期数))/SUM(成交量*100,(收盘价*BGTYU的有效数据周期数))))
起动线赋值:EXPMA((收盘价/VBNH),20)*1,画黄色,POINTDOT
主力线赋值:EXPMA((收盘价/VBNH),60)*1,画洋红色, 线宽为2
散户线赋值:EXPMA((收盘价/VBNH),120)*1,画绿色, 线宽为2
限制起动线赋值:起动线*中间价轴
限制主力线赋值:主力线*中间价轴
限制散户线赋值:散户线*中间价轴
主散MIN赋值:限制主力线和限制散户线的较小值
{分时转强赋值:主散MIN>金龙线 AND ((LONGCROSS(限制主力线,金龙线,2) OR CROSS(限制主力线,限制散户线)) OR (限制主力线>限制散户线 AND LONGCROSS(牵引线,金龙线,2)))
}
DRAWBAND(限制主力线,RGB(250,125,0),限制散户线,RGB(0,100,250))
当满足条件起动线<主力线时,在限制起动线和限制主力线之间画柱状线
当满足条件起动线>主力线时,在限制起动线和限制主力线之间画柱状线
STICKLINE(成交量>成交量的60日指数移动平均 AND 起动线>主力线,限制起动线,限制主力线,1,0),COLORFF00FF
STICKLINE(成交量>成交量的30日指数移动平均 AND 起动线>主力线 AND 起动线>1.01 AND 起动线>1日前的起动线,限制起动线,限制主力线,1,0),COLOR00FFFF
输出主力:限制主力线,COLORFFFFFF,LINETHICK1
输出分时均价线:240的C*V日累和/240的V日累和,画黄色, 线宽为2
追击涨停赋值:限制散户线>分时均价线 AND C上穿限制散户线
DRAWRECTREL(110,5,410,60,RGB(0,100,200))
DRAWRECTREL(110,5,260,60,RGB(0,250,50))
DRAWRECTREL(110,5,110+CONST(资金流量比*300/100),60,RGB(175,50,250))
DRAWRECTREL(260,23,260+CONST((增强流量比-50)*300/100),42,RGB(250,150,0))
DRAWTEXT_FIX(1,0.000,0.01,0,STRCAT(STRCAT('【资金流量比】',CON2STR(资金流量比,2)),'%买')),画黄色
DRAWRECTREL(610,5,910,60,RGB(0,100,200))
DRAWRECTREL(610,5,760,60,RGB(0,250,50))
DRAWRECTREL(610,5,610+CONST(攻击度限制*300/100),60,RGB(175,50,250))
DRAWRECTREL(760,23,760+CONST((增强攻击度-50)*300/100),42,RGB(250,150,0))
DRAWTEXT_FIX(1,0.500,0.01,0,STRCAT(STRCAT('【资金攻击度】',CON2STR(资金攻击度,2)),' %买')),画黄色
当满足条件C>0时,在横轴0.004纵轴0.085位置书写文字
当满足条件C>0时,在横轴0.08纵轴0.085位置书写文字
DRAWTEXT_FIX(C>0,0.16,0.085,0,EXTERNSTR(0,1)),画白色, 线宽为2
拉升量赋值:IF(C>1日前的C,成交量,0)
昨拉升最高值:=CONST(FIND最高价(拉升量,FROM开盘价,240,1)),LINETHICK1,画洋红色
今拉升最高值:=CONST(REF(FROM开盘价日内拉升量最高值,0)),画黄色,NODRAW
攻击力度赋值:今拉升最高值/昨拉升最高值,NODRAW
TT赋值:C的有效数据周期数
{取得有效收盘价}
均价黄赋值:TT的C*V日累和/TT的V日累和
{分时均线的取值}
量两步赋值:V的5日简单移动平均>REF(V的5日简单移动平均,1) AND REF(V的5日简单移动平均,1)>REF(V的5日简单移动平均,2)
价两步赋值: C>=1日前的C AND 1日前的C>2日前的C
价上岗量破5赋值:C>均价黄 AND V>V的5日简单移动平均
量起爆赋值:V>=1日前的V*1
价创新高赋值:C>=0日内C最高值
量创新高赋值:V>=0日内V最高值
对昨日涨幅赋值:(C/DYNAINFO(3)-1)*100<=2.50
{涨幅控制2个点以内}
每日一点赋值:量两步 AND 价两步 AND 价上岗量破5 AND 量起爆 AND 价创新高 AND 量创新高 AND 对昨日涨幅
{计算收益、已爆分钟}
VV赋值:BARSSINCE(每日一点)+1
首次起爆价赋值:VV-1日前的C,NODRAW
今天收益赋值:(现价-首次起爆价)/首次起爆价*100,NODRAW
流通盘赋值:当前流通股本*100/100000000,NODRAW
起爆时间赋值:VV日前的TIME/10000,NODRAW
已爆分钟赋值:VV-1,NODRAW
{画出底线和红球}
首次起爆量赋值:VV-1日前的成交量
STICKLINE(FILTER(拉升量上穿昨拉升最高值,30),最低+轴差*0.83,最低,1,0),画青色
DRAWICON(FILTER(拉升量上穿昨拉升最高值,30),最低+轴差*0.83,27)
DRAWTEXT(FILTER(拉升量上穿昨拉升最高值,30),最低+轴差*0.83,'∠量突破'),画青色
STICKLINE(每日一点的30过滤,最低+轴差*0.75,最低,1,0),画绿色
DRAWICON(每日一点的30过滤,最低+轴差*0.75,13)
DRAWTEXT(每日一点的30过滤,最低+轴差*0.75,'∠起爆'),画绿色
DRAWNUMBER(每日一点的30过滤,最低+(C-最低)/2,首次起爆价),画白色
当满足条件每日一点=1时,在横轴0.00纵轴0.10位置书写文字
}
TA赋值:上次TIME=100000距今天数
{股票指标网}
TC赋值:REF(0日内C最高值,TA+1)
TV赋值:REF(0日内V最高值,TA+1)
ZF赋值:C/DYNAINFO(3)<1.05
XG1赋值:C上穿TC AND V>TV AND ZF,画白色
TA1赋值:上次TIME=110000距今天数
CC1赋值:REF(0日内C最高值,TA1+1)
VV1赋值:REF(0日内V最高值,TA1+1)
ZF1:=CC1/DYNAINFO(3)<1.05
XG2赋值:C上穿CC1 AND V>VV1 AND ZF1,画黄色
突破赋值:XG1 OR XG2,画红色
STICKLINE(突破=1的15过滤,最低+轴差*0.60,最低,1,0),画白色
DRAWICON(突破=1的15过滤,最低+轴差*0.60,17)
DRAWTEXT(突破=1的15过滤,最低+轴差*0.60,'∠分时突破'),画白色
STICKLINE(开始攻击量=1的15过滤,最低+轴差*0.45,最低,1,0),画洋红色
STICKLINE(开始攻击=1的30过滤,最低+轴差*0.30,最低,1,0),画黄色
STICKLINE(CROSS(EXPMA((收盘价/VBNH),60),EXPMA((收盘价/VBNH),120)),最低+轴差*0.15,最低,1,0),画青色
DRAWICON(开始攻击量=1的15过滤,最低+轴差*0.45,24)
DRAWICON(开始攻击的30过滤,最低+轴差*0.30,23)
DRAWTEXT(开始攻击量=1的15过滤,最低+轴差*0.45,'∠攻击量'),画洋红色
DRAWTEXT(开始攻击的30过滤,最低+轴差*0.30,'开始攻击'),画黄色
DRAWTEXT(FILTER(CROSS(EXPMA((收盘价/VBNH),60),EXPMA((收盘价/VBNH),120)),30),最低+轴差*0.15,'★迹'),画青色
DRAWICON(FILTER(起动线上穿1.01,30),限制散户线,17)
DRAWTEXT(FILTER(起动线上穿1.01,30),最低,'可能涨停'),画洋红色
DRAWTEXT(追击涨停的30过滤,分时均价线+(限制散户线-分时均价线)/2,'追击涨停'),画红色