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

 找回密码
 注册昵称

QQ登录

只需一步,快速开始

搜索
上一主题 下一主题

[大智慧] 正版分时四线 副图 源码 附图


    [-----复制链接-----]
楼主
 通达信源码安装路径:1,工具栏点击公式选项。2,弹出公式窗口点击新建。3,把源码复制到指标编辑器保存。4,回到K线图界面安装建立好的公式 || 2024-3-21 17:04:04
正版分时四线 副图 源码 附图介绍

正版分时四线 副图 源码 附图

这是正版的分时四线免费的人中午盘后下载【DDE】也可用.
【1】神獒四线是原版的
DRAWTEXTREL(50,10,' 代码: '+STKLABEL+' '+STKNAME+' 日期: '+YEAR+'年'+MONTH+'月 '+DAY+'日 '),linethick2,ColorFFFF80;
DRAWTEXTREL(650,10,'㊣十二星座*神獒赢富㊣'),linethick1,COLOR00EEff;
a1:=SUM((ORDERVOL(1,3)),0);{特大买入}
a2:=SUM((ORDERVOL(2,3)),0);{特大卖出}
a3:=(SUM((ORDERVOL(1,2)),0)) - a1;{大单买入-特大买入}
a4:=(SUM((ORDERVOL(2,2)),0)) - a2;{大单卖出-特大卖出}
a5:=(SUM((ORDERVOL(1,1)),0)) - (SUM((ORDERVOL(1,2)),0));{中单买入-大单买入}
a6:=(SUM((ORDERVOL(2,1)),0)) - (SUM((ORDERVOL(2,2)),0));{中单卖出-大单卖出}
a7:=(SUM((ORDERVOL(1,0)),0)) - (SUM((ORDERVOL(1,1)),0));{所有委托卖入-中单买入}
a8:=(SUM((ORDERVOL(2,0)),0)) - (SUM((ORDERVOL(2,1)),0));{所有委托卖出-中单卖出}
a9:=(SUM((ORDERVOL(1,0)),0)) + (SUM((ORDERVOL(2,0)),0));{所有委托买入+所有委托卖出}
a10:=a7 - a8;{散单买入-散单卖出}
a11:=a5 - a6;{中单买入-中单卖出}
a12:=a3 - a4;{大单买入-大单卖出}
a13:=a1 - a2;{特大买入-特大卖出}
a14:=(SUM((ORDERVOL(1,2)),0)) - (SUM((ORDERVOL(2,2)),0));{大单买入-大单卖出}
a15:=(100 * a7) / a9;{散单买入占比}
a16:=(100 * a8) / a9;{散单卖出占比}
a17:=(100 * a5) / a9;{中单买入占比}
a18:=(100 * a6) / a9;{中单卖出占比}
a19:=(100 * a3) / a9;{大单买入占比}
a20:=(100 * a4) / a9;{大单卖出占比}
a21:=(100 * a1) / a9;{特大买入占比}
中户筹码:A11,linethick1,colorGreen;
大户筹码:A12,linethick1,colorYellow;
机构筹码:A13,linethick1,ColorFF0000;
主力筹码:A14,linethick2,colorRed;
a22:=(100 * a2) / a9;{特大卖出占比}
a23:=(100 * (SUM((ORDERVOL(1,2)),0))) / a9;{主力买入占比}
a24:=(100 * (SUM((ORDERVOL(2,2)),0))) / a9;{主力卖出占比}
a25:=(100 * a10) / a9;{散户差}
a26:=(100 * a11) / a9;{中户差}
a27:=(100 * a12) / a9;{大户差}
a28:=(100 * a13) / a9;{机构差}
a29:=(100 * a14) / a9;{主力差}
a30:=(a1);{机构买入筹码}
a31:=(a2);{机构卖出筹码}
a32:=(a3);{大户买入筹码}
a33:=(a4);{大户卖出筹码}
a34:=(a5);{中户买入筹码}
a35:=(a6);{中户卖出筹码}
a36:=(a7);{散户买入筹码}
a37:=(a8);{散户卖出筹码}
a38:=((SUM((ORDERVOL(1,2)),0)));{主力买入筹码}
a39:=((SUM((ORDERVOL(2,2)),0)));{主力卖出筹码}
a40:=(a10);{散户净买入筹码}
a41:=500 / (MAX(a30,a31,a32,a33,a34,a35,a36,a37,a40,中户筹码,大户筹码,机构筹码));
a42:=550 / (MAX(a38,a39,主力筹码));
a43:=600 - (a30 * a41);
a44:=600 - (a31 * a41);
a45:=600 - (a32 * a41);
a46:=600 - (a33 * a41);
a47:=600 - (a34 * a41);
a48:=600 - (a35 * a41);
a49:=600 - (a36 * a41);
a50:=600 - (a37 * a41);
a51:=600 - (a38 * a42);
a52:=600 - (a39 * a42);
a53:=600 - (a40 * a41);
a54:=600 - (中户筹码 * a41);
a55:=600 - (大户筹码 * a41);
a56:=600 - (机构筹码 * a41);
a57:=600 - (主力筹码 * a42);
DRAWRECTREL(50,a49,70,600,250),colorYellow;
DRAWRECTREL(70,a50,90,600,9213440),colorYellow;
DRAWRECTREL(90,a53,110,600,(IF((a10 >= 0),3289855,8584960))),colorYellow;
DRAWRECTREL(160,a47,180,600,250),colorYellow;
DRAWRECTREL(180,a48,200,600,9213440),colorYellow;
DRAWRECTREL(200,a54,220,600,(IF((a11 >= 0),3289855,8584960))),colorYellow;
DRAWRECTREL(270,a45,290,600,250),colorYellow;
DRAWRECTREL(290,a46,310,600,9213440),colorYellow;
DRAWRECTREL(310,a55,330,600,(IF((a12 >= 0),3289855,8584960))),colorYellow;
DRAWRECTREL(380,a43,400,600,250),colorYellow;
DRAWRECTREL(400,a44,420,600,9213440),colorYellow;
DRAWRECTREL(420,a56,440,600,(IF((a13 >= 0),3289855,8584960))),colorYellow;
DRAWRECTREL(925,a51,945,600,255),colorYellow;
DRAWRECTREL(945,a52,965,600,9213440),colorYellow;
DRAWRECTREL(965,a57,985,600,(IF((a14 >= 0),3289855,8584960))),colorYellow;
DRAWRECTREL(0,600,445,604,255),colorWhite;
DRAWTEXTREL(18,450,'散户'),ColorDDFFFF;
DRAWTEXTREL(125,450,'中户'),ColorDDFFFF;
DRAWTEXTREL(235,450,'大户'),ColorDDFFFF;
DRAWTEXTREL(345,450,'机构'),ColorDDFFFF;
DRAWTEXTREL(888,450,'主力'),ColorDDFFFF;
DRAWTEXTREL(2,720,'机构买:'+NUMTOSTR(a21)+'%'+' 大户买:'+NUMTOSTR(a19)+'%'+' 中户买:'+NUMTOSTR(a17)+'%'+' 散户买:'+NUMTOSTR(a15)+'%'),colorRed;
DRAWTEXTREL(2,790,'机构卖:'+NUMTOSTR(a22)+'%'+' 大户卖:'+NUMTOSTR(a20)+'%'+' 中户卖:'+NUMTOSTR(a18)+'%'+' 散户卖:'+NUMTOSTR(a16)+'%'),colorGreen;
DRAWTEXTREL(2,860,'机构差:'+NUMTOSTR(a28)+'%'+' 大户差:'+NUMTOSTR(a27)+'%'+' 中户差:'+NUMTOSTR(a26)+'%'+' 散户差:'+NUMTOSTR(a25)+'%'),colorWhite;
DRAWTEXTREL(2,930,'主力差:'+NUMTOSTR(a29)+'%'),colorWhite;

【2】这是我按我的方法优化的
{四条线}
分钟数:IF(TIME0/60-570<=130,TIME0/60-570,TIME0/60-660),PRECIS0,linethick0;
DRAWRECTABS(0,0 ,1300 ,999 , rgb(0,0,10)),LAYER7;
a1:=SUM((ORDERVOL(1,3)),0);
a2:=SUM((ORDERVOL(2,3)),0);
a3:=(SUM((ORDERVOL(1,2)),0)) - a1;
a4:=(SUM((ORDERVOL(2,2)),0)) - a2;
a5:=(SUM((ORDERVOL(1,1)),0)) - (SUM((ORDERVOL(1,2)),0));
a6:=(SUM((ORDERVOL(2,1)),0)) - (SUM((ORDERVOL(2,2)),0));
a7:=(SUM((ORDERVOL(1,0)),0)) - (SUM((ORDERVOL(1,1)),0));
a8:=(SUM((ORDERVOL(2,0)),0)) - (SUM((ORDERVOL(2,1)),0));
a9:=(SUM((ORDERVOL(1,0)),0)) + (SUM((ORDERVOL(2,0)),0));


a10:=a7 - a8;
a11:=a5 - a6;
a12:=a3 - a4;
a13:=a1 - a2;
a14:=(SUM((ORDERVOL(1,2)),0)) - (SUM((ORDERVOL(2,2)),0));

a15:=(100 * a7) / a9;
a16:=(100 * a8) / a9;
a17:=(100 * a5) / a9;
a18:=(100 * a6) / a9;
a19:=(100 * a3) / a9;
a20:=(100 * a4) / a9;
a21:=(100 * a1) / a9;

散户筹码:A10,linethick2,colorGreen,LAYER1;
中户筹码:A11,linethick1,colorGreen,LAYER1,DOTLINE;
大户筹码:A12,linethick3,colorYellow,LAYER1;
机构筹码:A13,linethick3,ColorFF9900,LAYER1;
主力筹码:A14,linethick2,colorRed,LAYER1;


FILLRGN(散户筹码,0),Color001a00,LAYER6;;
FILLRGN(主力筹码,0),Color000C30,LAYER6;;
a22:=(100 * a2) / a9;
a23:=(100 * (SUM((ORDERVOL(1,2)),0))) / a9;
a24:=(100 * (SUM((ORDERVOL(2,2)),0))) / a9;
a25:=(100 * a10) / a9;
a26:=(100 * a11) / a9;
a27:=(100 * a12) / a9;
a28:=(100 * a13) / a9;
a29:=(100 * a14) / a9;

a30:=(a1);
a31:=(a2);
a32:=(a3);
a33:=(a4);
a34:=(a5);
a35:=(a6);
a36:=(a7);
a37:=(a8);
a38:=((SUM((ORDERVOL(1,2)),0)));
a39:=((SUM((ORDERVOL(2,2)),0)));
a40:=(a10);
a41:=500 / (MAX(a30,a31,a32,a33,a34,a35,a36,a37,a40,中户筹码,大户筹码,机构筹码));
a42:=550 / (MAX(a38,a39,主力筹码));
a43:=600 - (a30 * a41);
a44:=600 - (a31 * a41);
a45:=600 - (a32 * a41);
a46:=600 - (a33 * a41);
a47:=600 - (a34 * a41);
a48:=600 - (a35 * a41);
a49:=600 - (a36 * a41);
a50:=600 - (a37 * a41);
a51:=600 - (a38 * a42);
a52:=600 - (a39 * a42);
a53:=600 - (a40 * a41);
a54:=600 - (中户筹码 * a41);
a55:=600 - (大户筹码 * a41);
a56:=600 - (机构筹码 * a41);
a57:=600 - (主力筹码 * a42);

DRAWRECTREL(50,a49,65,600,180),color0000FF,LINETHICK2;
DRAWRECTREL(70,a50,85,600,9213440),colorYellow;
DRAWRECTREL(90,a53,105,600,(IF((a10 >= 0),3289855,8584960))),colorYellow,LINETHICK2;
DRAWRECTREL(160,a47,175,600,180),color0000FF,LINETHICK2;
DRAWRECTREL(180,a48,195,600,9213440),colorYellow;
DRAWRECTREL(200,a54,215,600,(IF((a11 >= 0),3289855,8584960))),colorYellow,LINETHICK2;
DRAWRECTREL(270,a45,285,600,180),color0000FF,LINETHICK2;
DRAWRECTREL(290,a46,305,600,9213440),color00FF00,LINETHICK2;
DRAWRECTREL(310,a55,325,600,(IF((a12 >= 0),3289855,8584960))),colorYellow,LINETHICK2;
DRAWRECTREL(380,a43,395,600,180),color0000FF,LINETHICK2;
DRAWRECTREL(400,a44,415,600,9213440),color00FF00,LINETHICK2;
DRAWRECTREL(420,a56,435,600,(IF((a13 >= 0),3289855,8584960))),colorYellow,LINETHICK2;

{AA:EMA(ORDERVOL(1,2)/(ORDERVOL(1,0)+ORDERVOL(2,0)),2)*300;
BB:EMA(ORDERVOL(2,2)/(ORDERVOL(1,0)+ORDERVOL(2,0)),2)*300;
CC:EMA((ORDERVOL(1,2)-ORDERVOL(2,2))/(ORDERVOL(1,0)+ORDERVOL(2,0)),2)*300;
DRAWRECTREL(490,600-ref(cc,6),505,600,180),color0000FF,LINETHICK0;
DRAWRECTREL(510,600-ref(cc,4),525,600,9213440),color00FF00,LINETHICK0;
DRAWRECTREL(530,600-CC,545,600,(IF((CC >= 0),3289855,8584960))),colorYellow,LINETHICK0;}


DRAWRECTREL(925,a51,940,600,180),color0000FF,LINETHICK2;
DRAWRECTREL(945,a52,960,600,9213440),color00FF00,LINETHICK2;
DRAWRECTREL(965,a57,980,600,(IF((a14 >= 0),3289855,8584960))),colorYellow,LINETHICK2;
DRAWRECTREL(30,600,560,604,255),colorWhite;
DRAWRECTREL(910,600,990,604,255),colorWhite;
DRAWTEXTREL(90,250,'散户'),Color00FF00,LINETHICK4;
DRAWTEXTREL(90,300,''+NUMTOSTRN(a25,2)+'%'),Color11FFFF,LINETHICK4;
DRAWTEXTREL(200,250,'中户'),ColorDDFF00,LINETHICK4;
DRAWTEXTREL(200,300,''+NUMTOSTRN(a26,2)+'%'),Color11FFFF,LINETHICK4;
DRAWTEXTREL(310,250,'大户'),Color00FFFF,LINETHICK4;
DRAWTEXTREL(310,300,''+NUMTOSTRN(a27,2)+'%'),Color000FFF,LINETHICK4;
DRAWTEXTREL(420,250,'机构'),ColorFF9900,LINETHICK4;
DRAWTEXTREL(420,300,''+NUMTOSTRN(a28,2)+'%'),Color00FFFF,LINETHICK4;

DRAWTEXTREL(530,250,' 当前大单'),ColorFF00FF,LINETHICK4;
DRAWTEXTREL(530,300,' '+NUMTOSTRN((ORDERVOL(1,2)-ORDERVOL(2,2)),0)+ ' 手 '),ColorFF00FF,LINETHICK4;

DRAWTEXTREL(965,250,'主力'),Color0000FF,LINETHICK4;
DRAWTEXTREL(965,300,''+NUMTOSTRN(a29,2)+'%'),Color00FFFF,LINETHICK4;
DRAWTEXTABS(2,5,'机构买:'+NUMTOSTRN(a21,1)+'%'+' 大户买:'+NUMTOSTRN(a19,1)+'%'+' 中户买:'+NUMTOSTRN(a17,1)+'%'+' 散户买:'+NUMTOSTRN(a15,1)+'%'),colorRed;
DRAWTEXTABS(2,20,'机构卖:'+NUMTOSTRN(a22,1)+'%'+' 大户卖:'+NUMTOSTRN(a20,1)+'%'+' 中户卖:'+NUMTOSTRN(a18,1)+'%'+' 散户卖:'+NUMTOSTRN(a16,1)+'%'),colorGreen;
DRAWTEXTABS(0,40,' 买+卖(>10万):'+NUMTOSTRN(a21+a22+a20+a19,0)+'%'),color0000FF,LINETHICK5;
DRAWTEXTABS(0,60,' 买+卖(<10万):'+NUMTOSTRN(a18+a17+a16+a15,0)+'%'),color00FFff,LINETHICK5;

DRAWTEXTABS(360,0,' 大笔流入 '+NUMTOSTRN((sum(TRANSACTVOL(1,2)-TRANSACTVOL(2,2),0))/DYNAINFO(8)*100,2)+ '% '),COLOR00FF00,LINETHICK3;

BBD:SUM((ordervol(1,2)-ordervol(2,2))/v*amount/10000,0),linethick0;
DRAWTEXTABS( 600,5,'【分时BBD】:▄ '+NUMTOSTRN(BBD,2)+'万'),COLOR0077ff,LINETHICK5;
0,COLOR00EEff,DOTLINE;

大单:=(sum((ORDERVOL(1,2)-ORDERVOL(2,2)),分钟数));
大笔:=(sum((TRANSACTVOL(1,2)-TRANSACTVOL(2,2)),分钟数));
s2:=sma(大单+大笔,2,1);
s6:=sma(大单+大笔,6,1);
dk:2*(s2-s6);
量:dk,Colorff00ff,LINETHICK1,LAYER1;
FILLRGN(量,0,量>0,RGB(0,0,255)),LAYER5;
FILLRGN(量,0,量<0,RGB(0,50,30)),LAYER5;
((ORDERVOL(1,2)-ORDERVOL(2,2))+(TRANSACTVOL(1,2)-TRANSACTVOL(2,2)))*2,Color3D,LAYER1;
大笔:(sum((TRANSACTVOL(1,0)-TRANSACTVOL(2,0)),分钟数)),Color00ffff,LAYER1,DOTLINE;

我加进了分笔数据因为分笔左右了股价的涨跌而DDX在分时往往的股价相反,所以必须对照分笔数据,两个一块发你看好那个用那个,凡事都有两面性各取所长,简单的好,复杂的也有可取之处.
你可挑剔,可不用,怎么都行心满意足就好.经常有人说太花了,没办法啰,【2】是比【1】花 我也没法子,
 


 





gd18540

回复

举报

QQ|

GMT+8, 2024-11-17 16:01

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