通达信阶梯主力仓位副图指标 看主力增仓减仓、主力持仓等数据 源码 附图
主力买:=(L2_VOL(0,0)+L2_VOL(1,0))/CAPITAL*100;
主力卖:=(L2_VOL(0,1)+L2_VOL(1,1))/CAPITAL*100;
散户买:=(L2_VOL(2,0)+L2_VOL(3,0))/CAPITAL*100;
散户卖:=(L2_VOL(2,1)+L2_VOL(3,1))/CAPITAL*100;
主力增仓:主力买-主力卖,COLORRED,NODRAW;
散户增仓:散户买-散户卖,COLORMAGENTA,NODRAW;
主力持仓:SUM(主力增仓,0)+50,COLORYELLOW,NODRAW;
超大增仓:(L2_VOL(0,0)-L2_VOL(0,1))/CAPITAL*100,NODRAW;
大增仓:(L2_VOL(1,0)-L2_VOL(1,1))/CAPITAL*100,NODRAW;
对应上涨家:INDEXADV,COLOR0080FF,NODRAW;
对应下跌家:INDEXDEC,COLORGREEN,NODRAW;
总上涨家数:DYNAINFO(60),COLORRED,NODRAW;
总下跌家数:DYNAINFO(61),COLORGREEN,NODRAW;
STICKLINE(主力增仓<=0,REF(主力持仓,1),REF(主力持仓,1)+主力增仓,3.2,0),COLOR003300;
STICKLINE(主力增仓<=0,REF(主力持仓,1),REF(主力持仓,1)+主力增仓,2.7,0),COLOR006600;
STICKLINE(主力增仓<=0,REF(主力持仓,1),REF(主力持仓,1)+主力增仓,2.1,0),COLOR009900;
STICKLINE(主力增仓<=0,REF(主力持仓,1),REF(主力持仓,1)+主力增仓,1.5,0),COLOR00CC00;
STICKLINE(主力增仓<=0,REF(主力持仓,1),REF(主力持仓,1)+主力增仓,0.9,0),COLOR00FF00;
STICKLINE(主力增仓<=0,REF(主力持仓,1),REF(主力持仓,1)+主力增仓,0.2,0),COLORGREEN;
STICKLINE(主力增仓>=0,REF(主力持仓,1),REF(主力持仓,1)+主力增仓,3.2,0),COLOR000033;
STICKLINE(主力增仓>=0,REF(主力持仓,1),REF(主力持仓,1)+主力增仓,2.7,0),COLOR000066;
STICKLINE(主力增仓>=0,REF(主力持仓,1),REF(主力持仓,1)+主力增仓,2.1,0),COLOR000099;
STICKLINE(主力增仓>=0,REF(主力持仓,1),REF(主力持仓,1)+主力增仓,1.5,0),COLOR0000CC;
STICKLINE(主力增仓>=0,REF(主力持仓,1),REF(主力持仓,1)+主力增仓,0.9,0),COLOR0000FF;
STICKLINE(主力增仓>=0,REF(主力持仓,1),REF(主力持仓,1)+主力增仓,0.2,0),COLORCC66FF;
{T6:=IF(FINDSTR(EXTERNSTR(0,1),','),STRCAT('千股千评:',EXTERNSTR(0,1)),'');
DRAWTEXT_FIX(1,0.00,0.00,0,T6),COLOR00FFFF;}
DRAWTEXT_FIX(1,0.000,0.050,0,STRCAT(STRCAT('今日主力净额 : ',CON2STR(DYNAINFO(100)/10000,2)),' 万元')),COLORYELLOW;
DRAWTEXT_FIX(1,0.180,0.050,0,STRCAT(STRCAT('今日主买净额 : ',CON2STR(DYNAINFO(99)/10000,2)),' 万元')),,COLORYELLOW;
{行业板块排名}
TAX:=HORCALC(HYBLOCK,105,1,DRAWNULL);
TAA:=STRCAT(HYBLOCK,' 行业排名 :');
DRAWTEXT_FIX(ISLASTBAR,0.38,0.050,0,STRCAT(TAA,CON2STR(TAX,0))),COLORRED;
未来函数检测结果如下:
该公式包含未来函数:CAPITAL
该公式包含未来函数:DYNAINFO
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
主力买赋值:(L2_成交量(0,0)+L2_成交量(1,0))/当前流通股本*100
主力卖赋值:(L2_成交量(0,1)+L2_成交量(1,1))/当前流通股本*100
散户买赋值:(L2_成交量(2,0)+L2_成交量(3,0))/当前流通股本*100
散户卖赋值:(L2_成交量(2,1)+L2_成交量(3,1))/当前流通股本*100
输出主力增仓:主力买-主力卖,画红色,NODRAW
输出散户增仓:散户买-散户卖,画洋红色,NODRAW
输出主力持仓:0的主力增仓日累和+50,画黄色,NODRAW
输出超大增仓:(L2_成交量(0,0)-L2_成交量(0,1))/当前流通股本*100,NODRAW
输出大增仓:(L2_成交量(1,0)-L2_成交量(1,1))/当前流通股本*100,NODRAW
输出对应上涨家:INDEXADV,COLOR0080FF,NODRAW
输出对应下跌家:INDEXDEC,画绿色,NODRAW
输出总上涨家数:DYNAINFO(60),画红色,NODRAW
输出总下跌家数:DYNAINFO(61),画绿色,NODRAW
STICKLINE(主力增仓<=0,1日前的主力持仓,1日前的主力持仓+主力增仓,3.2,0),COLOR003300
STICKLINE(主力增仓<=0,1日前的主力持仓,1日前的主力持仓+主力增仓,2.7,0),COLOR006600
STICKLINE(主力增仓<=0,1日前的主力持仓,1日前的主力持仓+主力增仓,2.1,0),COLOR009900
STICKLINE(主力增仓<=0,1日前的主力持仓,1日前的主力持仓+主力增仓,1.5,0),COLOR00CC00
STICKLINE(主力增仓<=0,1日前的主力持仓,1日前的主力持仓+主力增仓,0.9,0),COLOR00FF00
STICKLINE(主力增仓<=0,1日前的主力持仓,1日前的主力持仓+主力增仓,0.2,0),画绿色
STICKLINE(主力增仓>=0,1日前的主力持仓,1日前的主力持仓+主力增仓,3.2,0),COLOR000033
STICKLINE(主力增仓>=0,1日前的主力持仓,1日前的主力持仓+主力增仓,2.7,0),COLOR000066
STICKLINE(主力增仓>=0,1日前的主力持仓,1日前的主力持仓+主力增仓,2.1,0),COLOR000099
STICKLINE(主力增仓>=0,1日前的主力持仓,1日前的主力持仓+主力增仓,1.5,0),COLOR0000CC
STICKLINE(主力增仓>=0,1日前的主力持仓,1日前的主力持仓+主力增仓,0.9,0),COLOR0000FF
STICKLINE(主力增仓>=0,1日前的主力持仓,1日前的主力持仓+主力增仓,0.2,0),COLORCC66FF
{T6赋值:IF(FINDSTR(EXTERNSTR(0,1),','),STRCAT('千股千评:',EXTERNSTR(0,1)),'')
当满足条件1时,在横轴0.00纵轴0.00位置书写文字
}
DRAWTEXT_FIX(1,0.000,0.050,0,STRCAT(STRCAT('今日主力净额 : ',CON2STR(DYNAINFO(100)/10000,2)),' 万元')),画黄色
DRAWTEXT_FIX(1,0.180,0.050,0,STRCAT(STRCAT('今日主买净额 : ',CON2STR(DYNAINFO(99)/10000,2)),' 万元')),,画黄色
{行业板块排名}
TAX赋值:HORCALC(HYBLOCK,105,1,DRAWNULL)
TAA赋值:STRCAT(HYBLOCK,' 行业排名 :')
DRAWTEXT_FIX(ISLASTBAR,0.38,0.050,0,STRCAT(TAA,CON2STR(TAX,0))),画红色