股资源-股票学习站-学炒股-股票课程-炒股教程-分析选股指标-入门基础知识

 找回密码
 注册昵称

QQ登录

只需一步,快速开始

搜索
上一主题 下一主题

[通达信] 通达信主力净买量副图指标贴图源码


    [-----复制链接-----]
楼主
 通达信源码安装路径:1,工具栏点击公式选项。2,弹出公式窗口点击新建。3,把源码复制到指标编辑器保存。4,回到K线图界面安装建立好的公式 || 2023-10-9 11:41:24

以下是通达信主力净买量副图指标贴图源码

{参数设置:
参(1.2.1) 日:(1.9999.1)}
起点:=75; 均分:=起点/140; CURR:=CURRBARSCOUNT;
总股本:=IF(C>=1000,MA(V,5)*100,CAPITAL); 基数:=总股本/5000000;
基准股:=总股本*0.1;
KDCM:=IF(参=1,CONST(100*WINNER(C)),100*WINNER(REF(C,日)));
SHTL:=IF(参=1,CONST(100*(1-WINNER(C))),100*(1-WINNER(REF(C,日))));
DDCM:=IF(参=1,CONST(EMA(100*WINNER(C),13)),EMA(100*WINNER(REF(C,日)),13));
券基:=DDCM*总股本*0.003+KDCM*总股本*0.004;
普通:=SHTL*总股本*0.008;
法人:=ABS(总股本-券基-普通);
虚拟总:=券基+普通+法人;
券基户数:=INTPART(ABS(DDCM)*基数*0.008);
法人户数:=INTPART(ABS(KDCM)*基数*0.02);
普通户数:=INTPART(SHTL*20*基数);
总户数:=券基户数+法人户数+普通户数;
STICKLINE(CURR=起点-ROUND(62*均分),10.5,20*(普通/虚拟总)+11,10,0),COLOR00FF00;
STICKLINE(CURR=起点-ROUND(55*均分),10.5,20*(法人/虚拟总)+11,10,0),COLOR00FFFF;
STICKLINE(CURR=起点-ROUND(47*均分),10.5,20*(券基/虚拟总)+11,10,0),COLOR0000FF;
%普通:=普通/虚拟总*10;
%法人:=法人/虚拟总*10;
%券基:=券基/虚拟总*10;
STICKLINE(CURR=起点-ROUND(62*均分),10.2,10-SUM(ABS(%普通-REF(%普通,1)),3),10,1),COLORFFFFFF;
STICKLINE(CURR=起点-ROUND(55*均分),10.2,10-SUM(ABS(%法人-REF(%法人,1)),3),10,1),COLOR00FFFF;
STICKLINE(CURR=起点-ROUND(47*均分),10.2,10-SUM(ABS(%券基-REF(%券基,1)),3),10,1),COLORFFFF00;
分类1:=IF(CURR=起点-ROUND(62*均分),'普通',IF(CURR=起点-ROUND(55*均分),'法人',
IF(CURR=起点-ROUND(47*均分),'券基',DRAWNULL)));
DRAWTEXT(CURR=起点-ROUND(62*均分) OR CURR=起点-ROUND(55*均分) OR CURR=起点-ROUND(47*均分),6,分类1),COLOR8E0000;
特大:=MAX(DDCM,0)*总股本*0.009,NODRAW;
大户:=KDCM*总股本*0.003+DDCM*总股本*0.001;
散户:=SHTL*总股本*0.008;
中户:=ABS(总股本-特大-大户-散户);
ZZ:=特大+大户+散户+中户;
STICKLINE(CURR=起点-ROUND(36*均分),10.5,20*(散户/ZZ)+11,10,0),COLOR00FF00;
STICKLINE(CURR=起点-ROUND(29*均分),10.5,20*(中户/ZZ)+11,10,0),COLORFF18A4;
STICKLINE(CURR=起点-ROUND(22*均分),10.5,20*(大户/ZZ)+11,10,0),COLOR00FFFF;
STICKLINE(CURR=起点-ROUND(15*均分),10.5,20*(特大/ZZ)+11,10,0),COLOR0000FF;
%散户:=散户/ZZ*10;
%中户:=中户/ZZ*10;
%大户:=大户/ZZ*10;
%特大:=特大/ZZ*10;
STICKLINE(CURR=起点-ROUND(36*均分),10.2,10-SUM(ABS(%散户-REF(%散户,1)),3),10,1),COLOR0000FF;
STICKLINE(CURR=起点-ROUND(29*均分),10.2,10-SUM(ABS(%中户-REF(%中户,1)),3),10,1),COLOR9732F6;
STICKLINE(CURR=起点-ROUND(22*均分),10.2,10-SUM(ABS(%大户-REF(%大户,1)),3),10,1),COLORFF0000;
STICKLINE(CURR=起点-ROUND(15*均分),10.2,10-SUM(ABS(%特大-REF(%特大,1)),3),10,1),COLOR880088;
分类2:=IF(CURR=起点-ROUND(35*均分),'普户',IF(CURR=起点-ROUND(28*均分),'中户',
IF(CURR=起点-ROUND(20*均分),'大户',IF(CURR=起点-ROUND(13*均分),'特大',DRAWNULL))));
DRAWTEXT(CURR=起点-ROUND(35*均分) OR CURR=起点-ROUND(28*均分) OR
CURR=起点-ROUND(20*均分) OR CURR=起点-ROUND(13*均分),6,分类2),COLOREE0000;
A1K:=SHTL*总股本*0.008+基准股*0.5+DDCM*总股本*0.001;
A1W:=SHTL*总股本*0.004+基准股*0.7+DDCM*总股本*0.002;
A5W:=SHTL*总股本*0.002+基准股*0.9+DDCM*总股本*0.002;
A10W:=基准股*0.15+KDCM*总股本*0.0002;
A50W:=基准股*0.3+KDCM*总股本*0.0001;
A100W:=基准股*0.1+KDCM*总股本*0.0001;
A500W:=DDCM*总股本*0.01+KDCM*总股本*0.0001;
A1000W:=DDCM*总股本*0.02+KDCM*总股本*0.0002;
A1000WP:=DDCM*总股本*0.05;
总价:=A1K+A1W+A5W+A10W+A50W+A100W+A500W+A1000W+A1000WP;

STICKLINE(CURR=起点-ROUND(74*均分),10.5,20*(A1000WP/总价)+11,10,0),COLOR0000FF;
STICKLINE(CURR=起点-ROUND(82*均分),10.5,20*(A1000W/总价)+11,10,0),COLOR9732F6;
STICKLINE(CURR=起点-ROUND(90*均分),10.5,20*(A500W/总价)+11,10,0),COLORFF0000;
STICKLINE(CURR=起点-ROUND(98*均分),10.5,20*(A100W/总价)+11,10,0),COLOR880088;
STICKLINE(CURR=起点-ROUND(106*均分),10.5,20*(A50W/总价)+11,10,0),COLORFFFF00;
STICKLINE(CURR=起点-ROUND(112*均分),10.5,20*(A10W/总价)+11,10,0),COLOR00FF00;
STICKLINE(CURR=起点-ROUND(120*均分),10.5,20*(A5W/总价)+11,10,0),COLOR00FFFF;
STICKLINE(CURR=起点-ROUND(129*均分),10.5,20*(A1W/总价)+11,10,0),COLOR18A4FF;
STICKLINE(CURR=起点-ROUND(137*均分),10.5,20*(A1K/总价)+11,10,0),COLORFFFFFF;
DRAWNUMBER(CURR=起点-ROUND(72*均分),20*(A1000WP/总价)+13,(A1000WP/总价)*100),COLORFFFFFF;
DRAWNUMBER(CURR=起点-ROUND(80*均分),20*(A1000W/总价)+13,(A1000W/总价)*100),COLOR18A4FF;
DRAWNUMBER(CURR=起点-ROUND(88*均分),20*(A500W/总价)+13,(A500W/总价)*100),COLOR00FFFF;
DRAWNUMBER(CURR=起点-ROUND(96*均分),20*(A100W/总价)+13,(A100W/总价)*100),COLORFFFF00;
DRAWNUMBER(CURR=起点-ROUND(104*均分),20*(A50W/总价)+13,(A50W/总价)*100),COLOR880088;
DRAWNUMBER(CURR=起点-ROUND(110*均分),20*(A10W/总价)+13,(A10W/总价)*100),COLOR00FF00;
DRAWNUMBER(CURR=起点-ROUND(118*均分),20*(A5W/总价)+13,(A5W/总价)*100),COLORFF0000;
DRAWNUMBER(CURR=起点-ROUND(127*均分),20*(A1W/总价)+13,(A1W/总价)*100),COLOR9732F6;
DRAWNUMBER(CURR=起点-ROUND(135*均分),20*(A1K/总价)+13,(A1K/总价)*100),COLOR0000FF;
%A1K:=A1K/总价*10;
%A1W:=A1W/总价*10;
%A5W:=A5W/总价*10;
%A10W:=A10W/总价*10;
%A50W:=A50W/总价*10;
%A100W:=A100W/总价*10;
%A500W:=A500W/总价*10;
%A1000W:=A1000W/总价*10;
%A1000WP:=A1000WP/总价*10;
STICKLINE(CURR=起点-ROUND(74*均分),10.2,10-ABS(%A1000WP-REF(%A1000WP,1)),10,1),COLORFFFFFF;
STICKLINE(CURR=起点-ROUND(82*均分),10.2,10-ABS(%A1000W-REF(%A1000W,1)),10,1),COLOR18A4FF;
STICKLINE(CURR=起点-ROUND(90*均分),10.2,10-ABS(%A500W-REF(%A500W,1)),10,1),COLOR00FFFF;
STICKLINE(CURR=起点-ROUND(98*均分),10.2,10-ABS(%A100W-REF(%A100W,1)),10,1),COLORFFFF00;
STICKLINE(CURR=起点-ROUND(106*均分),10.2,10-ABS(%A50W-REF(%A50W,1)),10,1),COLOR00FF00;
STICKLINE(CURR=起点-ROUND(112*均分),10.2,10-ABS(%A10W-REF(%A10W,1)),10,1),COLOR880088;
STICKLINE(CURR=起点-ROUND(120*均分),10.2,10-ABS(%A5W-REF(%A5W,1)),10,1),COLORFF0000;
STICKLINE(CURR=起点-ROUND(129*均分),10.2,10-ABS(%A1W-REF(%A1W,1)),10,1),COLOR9732F6;
STICKLINE(CURR=起点-ROUND(137*均分),10.2,10-ABS(%A1K-REF(%A1K,1)),10,1),COLOR0000FF;
分类3:=IF(CURR=起点-ROUND(72*均分),'1000万以上',IF(CURR=起点-ROUND(90*均分),'500万',
IF(CURR=起点-ROUND(106*均分),'50万',IF(CURR=起点-ROUND(120*均分),'5万',
IF(CURR=起点-ROUND(135*均分),'0.1万',DRAWNULL)))));
DRAWTEXT(CURR=起点-ROUND(72*均分) OR CURR=起点-ROUND(90*均分) OR
CURR=起点-ROUND(106*均分) OR CURR=起点-ROUND(120*均分) OR CURR=起点-ROUND(135*均分),5,分类3),COLOR0000FF;
分类4:=IF(CURR=起点-ROUND(82*均分),'1000万',IF(CURR=起点-ROUND(98*均分),'100万',
IF(CURR=起点-ROUND(112*均分),'10万',IF(CURR=起点-ROUND(127*均分),'1万',DRAWNULL))));
DRAWTEXT(CURR=起点-ROUND(82*均分) OR CURR=起点-ROUND(98*均分) OR
CURR=起点-ROUND(112*均分) OR CURR=起点-ROUND(127*均分) OR CURR=起点-ROUND(135*均分),7,分类4),COLOR0000FF;
DRAWTEXT(CURR=起点-ROUND(5*均分),MAX(20*(散户/ZZ),20*(A1000WP/总价))+8,'持仓:'),COLORFFFFFF;
STICKLINE(CURR=起点-ROUND(5*均分) OR CURR=起点-ROUND(42*均分) OR CURR=起点-ROUND(68*均分),MAX(20*(散户/ZZ),20*(A1000WP/总价))+11,5,0,-1),COLORFFFFFF;
DRAWICON(CURR=IF(参=2,日,DRAWNULL),MAX(20*(散户/ZZ),20*(A1000WP/总价))+11,11);
DRAWTEXT((CURR=起点-ROUND(5*均分)+2) OR (CURR=起点-ROUND(5*均分)),IF(CURR=起点-ROUND(5*均分),7,11),IF(CURR=起点-ROUND(5*均分),'分类:','今昨比差:')),COLORFFFFFF;





回复

举报

QQ|

GMT+8, 2024-11-18 14:43

快速回复 返回顶部 返回列表