: | : | :期货量化学习 | :期货量化 |
返回列表 发帖

[通达信指标/源码] 通达信超强分时图指标[通达信指标](已修复)

[通达信指标/源码] 通达信超强分时图指标[通达信指标](已修复)

源码如下:
  1. MA30:=EMA(CLOSE,30);
  2. 强弱:=EMA(CLOSE,900);
  3. STICKLINE((MA30>强弱),MA30,强弱,0,-1),COLORLIGRAY;
  4. STICKLINE((MA30<强弱),MA30,强弱,0,-1),COLORLICYAN;
  5. H1:=MAX(DYNAINFO(3),DYNAINFO(5));
  6. L1:=MIN(DYNAINFO(3),DYNAINFO(6));
  7. P1:=H1-L1;
  8. 阻力:L1+P1*7/8,COLORLIMAGENTA,DOTLINE;
  9. 支撑:L1+P1*0.5/8,COLORCYAN,DOTLINE;
  10. 中:(支撑+阻力)/2,COLORLIGRAY,POINTDOT;
  11. 均价:SUM(V*C,0)/SUM(V,0),COLORYELLOW,DOTLINE;
  12. 现价:CLOSE,COLORWHITE,LINETHICK3;
  13. DRAWTEXT(ISLASTBAR AND 现价,现价,STRCAT('←',CON2STR(现价,2))),COLORYELLOW;
  14. STICKLINE(CROSS(支撑,现价),支撑,中,0,-1),COLORYELLOW;
  15. STICKLINE(CROSS(现价,阻力),阻力,中,0,-1),COLORGREEN;
  16. DRAWTEXT(LONGCROSS(支撑,现价,2),C*0.9982,' 买'),COLORYELLOW;
  17. DRAWTEXT(LONGCROSS(现价,阻力,2),C*1.0018,' 卖'),COLORCYAN;
  18. STICKLINE(C<支撑,支撑,C,1,0),COLORYELLOW;
  19. DRAWICON(CROSS(支撑,现价),(支撑-中)/5+支撑,26);
  20. STICKLINE(C>阻力,阻力,C,1,0),COLORLIGREEN;
  21. DRAWICON(CROSS(现价,阻力),阻力-(支撑-中)/5,15);
  22. DRAWTEXT(CURRBARSCOUNT=8,阻力+0.003,'顶'),COLORYELLOW;
  23. DRAWTEXT(CURRBARSCOUNT=8,支撑-0.003,'底'),COLORGREEN;
  24. DRAWTEXT(CURRBARSCOUNT=8,(支撑+阻力)/2,'中'),COLORLIRED;
  25. 成交额:=V*C/100,NODRAW;
  26. A2:=SUM((IF(((成交额/8>20) AND (CLOSE>(REF(CLOSE,1)))),成交额,0)),0);
  27. A3:=SUM((IF(((成交额/8>20) AND (CLOSE<(REF(CLOSE,1)))),成交额,0)),0);
  28. A6:=(A2+A3);
  29. A7:=IF((ISLASTBAR),((100*A2)/A6),0);
  30. A8:=IF((ISLASTBAR),((100*A3)/A6),0);
  31. DD1:=1;
  32. AAA1:=STRCAT(STRCAT('机构买',CON2STR((100*A2)/A6,0)),'%');
  33. AAA2:=STRCAT(STRCAT('机构卖',CON2STR((100*A3)/A6,0)),'%');
  34. AAA3:=STRCAT(STRCAT('机构总买入',CON2STR((100*(A2-A3))/A6,0)),'%');
  35. A000:=DRAWTEXT_FIX(DD1=1,0,0.02,0,AAA1);
  36. A001:=DRAWTEXT_FIX(DD1=1,0,0.13,0,AAA2);
  37. DRAWTEXT_FIX(DD1=1,0.842,1,0,AAA3),COLORYELLOW;
  38. 现手买:BUYVOL*DYNAINFO(7)*100/10000 COLOR0000FF,NODRAW;
  39. 现手卖:SELLVOL*DYNAINFO(7)*100/10000 COLOR00FF00,NODRAW;
  40. 合:=ABS(现手买)+ABS(现手卖)COLOR80FFFF,NODRAW;
  41. 差:=ABS(现手买)-ABS(现手卖)COLOR80FFFF,NODRAW;
  42. MPB1:=ABS(现手买)/合*100;
  43. MPB2:=ABS(现手卖)/合*100;
  44. TESTSKIP(NOT(现手买 OR 现手卖 OR 合 OR 差 OR MPB1 OR MPB2)!=0);
  45. DRAWRECTREL(595,1000,795,940,RGB(0,128,0));
  46. DRAWRECTREL(595,995,795,945,RGB(0,148,0));
  47. DRAWRECTREL(595,990,795,950,RGB(0,168,0));
  48. DRAWRECTREL(595,985,795,955,RGB(0,188,0));
  49. DRAWRECTREL(595,980,795,960,RGB(0,208,0));
  50. DRAWRECTREL(595,975,795,965,RGB(0,228,0));
  51. DRAWRECTREL(595,970,795,970,RGB(0,248,0));
  52. DRAWRECTREL(595,1000,595+现手买*210/合,940,RGB(128,0,0));
  53. DRAWRECTREL(595,995,595+现手买*210/合,945,RGB(148,0,0));
  54. DRAWRECTREL(595,990,595+现手买*210/合,950,RGB(168,0,0));
  55. DRAWRECTREL(595,985,595+现手买*210/合,955,RGB(188,0,0));
  56. DRAWRECTREL(595,980,595+现手买*210/合,960,RGB(208,0,0));
  57. DRAWRECTREL(595,975,595+现手买*210/合,965,RGB(228,0,0));
  58. DRAWRECTREL(595,970,595+现手买*210/合,970,RGB(248,0,0));
  59. DRAWRECTREL(595+现手买*210/合,940,595+现手买*210/合,1000,RGB(128,0,0));
  60. DRAWRECTREL(795,940,795,1000,RGB(0,0.0,10));
  61. DRAWRECTREL(594.8,939.8,594.8,1000,RGB(0,0,10));
  62. DRAWRECTREL(594.8,939.8,594.8,939.8,RGB(0,0,10));
  63. DRAWRECTREL(594.8,1000,594.8,1000,RGB(0,0,10));
  64. DRAWTEXT_FIX(1,0.560,0.89,0,STRCAT(STRCAT('',CON2STR(现手买,1)),'万')),COLORRED;
  65. DRAWTEXT_FIX(1,0.800,0.89,0,STRCAT(STRCAT('',CON2STR(现手卖,1)),'万')),COLORGREEN;
  66. DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(差)>0,0.678,0.888,0,STRCAT(' ',STRCAT(CON2STR(差,1),'万'))) COLORRED;
  67. DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(差)<0,0.678,0.888,0,STRCAT(' ',STRCAT(CON2STR(差,1),'万'))) COLORGREEN;
  68. DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(差)=0,0.678,0.888,0,STRCAT(' ',STRCAT(CON2STR(差,1),'万'))) COLOR80FFFF;
  69. DRAWTEXT_FIX(1,0.800,0.98,0,STRCAT(STRCAT(' ',CON2STR(MPB2,1)),'%')),COLORGREEN;
  70. DRAWTEXT_FIX(1,0.560,0.98,0,STRCAT(STRCAT('',CON2STR(MPB1,1)),'%')),COLORRED;
  71. 市盈率:=STRCAT('市盈率: ',CON2STR(C/FINANCE(33),2));
  72. 市销率:=STRCAT('市销率: ',CON2STR(C/(FINANCE(20)/FINANCE(1)),2));
  73. 市净率:=STRCAT('市净率: ',CON2STR(C/FINANCE(34),2));
  74. 净资收益率:=STRCAT('净资收益率: ',CON2STR(FINANCE(33)/FINANCE(34)*100,2));
  75. 毛利率:=STRCAT('毛利率: ',CON2STR((FINANCE(20)-FINANCE(21))/FINANCE(20)*100,2));
  76. 净利润率:=STRCAT('净利润率 ',CON2STR(FINANCE(30)/FINANCE(20)*100,2));
  77. 主营利润率:=STRCAT('主营利润率 ',CON2STR(FINANCE(23)/FINANCE(20)*100,2));
  78. 利润同比:=STRCAT('利润同比: ',CON2STR(FINANCE(43),2));
  79. 收入同比:=STRCAT('收入同比: ',CON2STR(FINANCE(44),2));
  80. X1:=(FINANCE(11)-FINANCE(15))/FINANCE(10)*1.2;
  81. X2:=(FINANCE(31)+FINANCE(17))/FINANCE(10)*1.4;
  82. X3:=FINANCE(23)/FINANCE(10)*3.3;
  83. X4:=FINANCE(19)/FINANCE(15)*0.6;
  84. X5:=FINANCE(20)/FINANCE(15)*0.999;
  85. Z值:=X1+X2+X3+X4+X5;
  86. 预警:=IF(Z值<1.2,'重警',IF(Z值>=1.2 AND Z值<2.6,'轻警','无警'));
  87. 财务预警:=STRCAT('财务预警: ',STRCAT(预警,STRCAT('-Z值: ',CON2STR(Z值,3))));
  88. 优质资产率:=STRCAT(' 优质资产率: ',CON2STR((FINANCE(19)-FINANCE(22)-FINANCE(27))/FINANCE(19),2));
  89. 现金负债比:=STRCAT(' 现金负债比: ',CON2STR(FINANCE(25)/FINANCE(15),3));
  90. 财务系数:=STRCAT('风险系数: ',STRCAT(STRCAT(财务预警,优质资产率),现金负债比));
  91. DRAWTEXT_FIX(ISLASTBAR,0.222,0.96,0,财务系数),COLORLIBLUE;
  92. D1:=YEAR AND MONTH AND DAY;
  93. AA1:=STRCAT(CON2STR(YEAR,0),'年');
  94. AA2:=STRCAT(CON2STR(MONTH,0),'月');
  95. AA3:=STRCAT(CON2STR(DAY,0),'日');
  96. AA4:=STRCAT('星期',IF(WEEKDAY=1,'一',IF(WEEKDAY=2,'二',IF(WEEKDAY=3,'三',IF(WEEKDAY=4,'四',IF(WEEKDAY=5,'五',IF(WEEKDAY=6,'六','日')))))));
  97. AA:=STRCAT(STRCAT(STRCAT(AA1,AA2),STRCAT(AA3,AA4)),'');
  98. DRAWTEXT_FIX(D1,0.888,0.001,0,AA),COLORLIGRAY;
  99. MZ0:=(BARSLAST(((HOUR=9) AND (MINUTE=31)))+1);
  100. 上穿分时:IF(((SETCODE<2) AND (CONST(MZ0)<241)),CONST(IF((TIME<1000),HHV(CLOSE,0),SUM((IF((TIME=1000),1,0)*HHV(CLOSE,0)),0))),DRAWNULL),LINETHICK1,COLORLIRED;
  101. 底支:IF(((SETCODE<2) AND (CONST(MZ0)<241)),CONST(IF((TIME<1000),HHV(CLOSE,0),SUM((IF((TIME=1000),1,0)*LLV(CLOSE,0)),0))),DRAWNULL),LINETHICK1,COLORLIGREEN;
  102. STICKLINE(TIME=931 OR TIME=1000,上穿分时,底支,0,-1),COLORLIBLUE;
  103. 分时上突:=CROSS(C,上穿分时);
  104. 上突:=C<上穿分时 AND 上穿分时>底支;
  105. DRAWICON(分时上突,C,5);
  106. 股价支撑线:=MA(CLOSE,20);
  107. 底价线:股价支撑线-2*STD(CLOSE,20),COLORMAGENTA,LINETHICK2;
  108. DRAWTEXT_FIX(1,0.0001,0.00,0,STRCAT(STRCAT('【今日强势有效突破】',CON2STR(上穿分时,2)),' 元 买入稳赚')),COLORYELLOW;
  109. DRAWTEXT_FIX(1,0.5001,0.00,0,STRCAT(STRCAT('【底部得到有效支撑】',CON2STR(底支,2)),' 元 可以参考')),COLORLIRED;
复制代码




论坛官方微信、群(期货热点、量化探讨、开户与绑定实盘)
 
期货论坛 - 版权/免责声明   1.本站发布源码(包括函数、指标、策略等)均属开放源码,用意在于让使用者学习程序化语法撰写,使用者可以任意修改语法內容并调整参数。仅限用于个人学习使用,请勿转载、滥用,严禁私自连接实盘账户交易
  2.本站发布资讯(包括文章、视频、历史记录、教材、评论、资讯、交易方案等)均系转载自网络主流媒体,内容仅为作者当日个人观点,本网转载此文出于传递更多信息之目的,并不意味着赞同其观点或证实其描述。本网不对该类信息或数据做任何保证。不对您构成任何投资建议,不能依靠信息而取代自身独立判断,不对因使用本篇文章所诉信息或观点等导致的损失承担任何责任。
  3.本站发布资源(包括书籍、杂志、文档、软件等)均从互联网搜索而来,仅供个人免费交流学习,不可用作商业用途,本站不对显示的内容承担任何责任。请在下载后24小时内删除。如果喜欢,请购买正版,谢谢合作!
  4.龙听期货论坛原创文章属本网版权作品,转载须注明来源“龙听期货论坛”,违者本网将保留追究其相关法律责任的权力。本论坛除发布原创文章外,亦致力于优秀财经文章的交流分享,部分文章推送时若未能及时与原作者取得联系并涉及版权问题时,请及时联系删除。联系方式:http://www.qhlt.cn/thread-262-1-1.html
如何访问权限为100/255贴子:/thread-37840-1-1.html;注册后仍无法回复:/thread-23-1-1.html;微信/QQ群:/thread-262-1-1.html;网盘链接失效解决办法:/thread-93307-1-1.html

返回列表