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

大智慧超级无敌主图指标源码 无未来函数[大智慧公式]

大智慧超级无敌主图指标源码 无未来函数[大智慧公式]

无未来函数

大智慧超级无敌BOLL主图指标:

参数:

N 缺省20最小1最大100步长1
P 缺省3 最小0.1最大10步长1


源码:


  1. BBI:=(MA(CLOSE,3)+MA(CLOSE,6)+MA(CLOSE,12)+MA(CLOSE,24))/4;
  2. DWN:BBI-P*STD(BBI,N),LINETHICK2;
  3. UPR:BBI+P*STD(BBI,N),LINETHICK2;
  4. MA5:MA(c,5),COLORFF50FF,LINETHICK2;
  5. partline(MA5,MA5>=ref(MA5,1),RGB(255,0,0),MA5<ref(MA5,1),RGB(0,250,0)),LINETHICK3;
  6. DRAWGBKLAST(MA5>=ref(MA5,1),STRIP(RGB(0,150,0),RGB(150,0,0),1));
  7. DRAWGBKLAST(MA5<=ref(MA5,1),STRIP(RGB(150,0,0),RGB(0,150,0),1));
  8. VAR326:=IF(CLOSE>ref(CLOSE,1),88,0);
  9. VAR327:=IF(CLOSE/ref(CLOSE,1)>1.050 AND HIGH/CLOSE<1.010 AND VAR326>0, 91, 0);
  10. DRAWTEXT(VAR327>90,LOW*0.99,'追'),COLORYELLOW;
  11. STICKLINE(VAR327>90,OPEN,CLOSE,3,0),COLORYELLOW;
  12. STICKLINE(VAR327>90,LOW,HIGH,0,0 ),COLORYELLOW;
  13. {45度异动}
  14. x1:=(C+L+H)/3;
  15. bb13:=atan(eMA(x1,13)-ref(eMA(x1,13),1))*3.1416*10;
  16. eMA8:=eMA(c,8);
  17. DRAWTEXT(filter(bb13>1 and eMA(x1,13)>ref(eMA(x1,8),1),10),
  18. eMA8,'∠45上升'),coloryelLOW;
  19. AAA:=(3*C+H+L+O)/6;
  20. CXH:=STRTONUM(STRRIGHT(DATESTR(CURRENTDATE),1));
  21. WARNING('http://www.cxh99.com',CURRENTTIME>180000 and (CXH=2 OR CXH=7));
  22. DRAWTEXTREL(10 ,10 ,'');
  23. VAR41:=(8*AAA+7*ref(AAA,1)+6*ref(AAA,2)+5*ref(AAA,3)+4*ref(AAA,4)+3*ref(AAA,5)+2*ref(AAA,6)+ref(AAA,8))/36;
  24. TJ1:=VOL=HHV(VOL,10) AND VOL>2*ref(VOL,1) AND CLOSE>VAR41;
  25. 立桩量:=FILTER(TJ1,5);
  26. TJ2:=IF(BARSLAST(立桩量)=1 AND CLOSE>ref(HIGH,1),1,IF(BARSLAST(立桩量)=2 AND CLOSE>ref(HIGH,2),1,IF(BARSLAST(立桩量)=3 AND CLOSE>ref(HIGH,3),1,0)));
  27. 突破:=TJ2=1;
  28. TJ3:=IF(BARSLAST(立桩量)=1 AND CLOSE>ref(LOW,1),1,IF(BARSLAST(立桩量)=2 AND CLOSE>ref(LOW,2),1,IF(BARSLAST(立桩量)=3 AND CLOSE>ref(LOW,3),1,0)));
  29. 三天法则:=TJ3=1;
  30. 成立:=三天法则 AND 突破;
  31. 条件成立:=FILTER(成立,3);
  32. DRAWTEXT(条件成立,L*0.99,'立桩量'),COLORYELLOW;
  33. var1:=CLOSE>ref(CLOSE,1) AND CLOSE>ref(CLOSE,2);
  34. var2:=ref(var1,1) AND CLOSE<=ref(CLOSE,1) AND CLOSE>=ref(CLOSE,2);
  35. var3:=ref(var2,1) AND CLOSE>=ref(CLOSE,1) AND CLOSE<=ref(CLOSE,2);
  36. var4:=ref(var3,1) AND CLOSE<=ref(CLOSE,1) AND CLOSE>=ref(CLOSE,2);
  37. var5:=ref(var4,1) AND CLOSE>=ref(CLOSE,1) AND CLOSE<=ref(CLOSE,2);
  38. var6:=ref(var5,1) AND CLOSE<=ref(CLOSE,1) AND CLOSE>=ref(CLOSE,2);
  39. var7:=ref(var6,1) AND CLOSE>=ref(CLOSE,1) AND CLOSE<=ref(CLOSE,2);
  40. var8:=ref(var7,1) AND CLOSE<=ref(CLOSE,1) AND CLOSE>=ref(CLOSE,2);
  41. var9:=ref(var8,1) AND CLOSE>=ref(CLOSE,1) AND CLOSE<=ref(CLOSE,2);
  42. varA:=ref(var9,1) AND CLOSE<=ref(CLOSE,1) AND CLOSE>=ref(CLOSE,2);
  43. varB:=ref(varA,1) AND CLOSE>=ref(CLOSE,1) AND CLOSE<=ref(CLOSE,2);
  44. varC:=ref(varB,1) AND CLOSE<=ref(CLOSE,1) AND CLOSE>=ref(CLOSE,2);
  45. varD:=CLOSE<ref(CLOSE,1) AND CLOSE<ref(CLOSE,2);
  46. varE:=ref(varD,1) AND CLOSE>=ref(CLOSE,1) AND CLOSE<=ref(CLOSE,2);
  47. varF:=ref(varE,1) AND CLOSE<=ref(CLOSE,1) AND CLOSE>=ref(CLOSE,2);
  48. var10:=ref(varF,1) AND CLOSE>=ref(CLOSE,1) AND CLOSE<=ref(CLOSE,2);
  49. var11:=ref(var10,1) AND CLOSE<=ref(CLOSE,1) AND CLOSE>=ref(CLOSE,2); {本文来至程序化交易网 cxh99.com}
  50. var12:=ref(var11,1) AND CLOSE>=ref(CLOSE,1) AND CLOSE<=ref(CLOSE,2);
  51. var13:=ref(var12,1) AND CLOSE<=ref(CLOSE,1) AND CLOSE>=ref(CLOSE,2);
  52. var14:=ref(var13,1) AND CLOSE>=ref(CLOSE,1) AND CLOSE<=ref(CLOSE,2);
  53. var15:=ref(var14,1) AND CLOSE<=ref(CLOSE,1) AND CLOSE>=ref(CLOSE,2);
  54. var16:=ref(var15,1) AND CLOSE>=ref(CLOSE,1) AND CLOSE<=ref(CLOSE,2);
  55. var17:=ref(var16,1) AND CLOSE<=ref(CLOSE,1) AND CLOSE>=ref(CLOSE,2);
  56. var18:=ref(var17,1) AND CLOSE>=ref(CLOSE,1) AND CLOSE<=ref(CLOSE,2);
  57. var19:=ref(varD OR varE OR varF OR var10 OR var11 OR var12 OR var13 OR
  58. var14 OR var15 OR var16 OR var17 OR var18,1) AND var1;
  59. var1A:=ref(var1 OR var2 OR var3 OR var4 OR var5 OR var6 OR var7 OR
  60. var8 OR var9 OR varA OR varB OR varC,1) AND varD;
  61. STICKLINE(var19,ref(CLOSE,1),ref(CLOSE,2),8,0),COLOR00FFFF;{黄色}
  62. STICKLINE(var1A,ref(CLOSE,1),ref(CLOSE,2),8,0),COLORFF00FF;{粉红色}
  63. 黄底买入:var19,LINETHICK0,COLOR00ffff;
  64. 粉顶卖出:var1A,LINETHICK0,COLORFF50FF;
  65. 红色持股:0,LINETHICK0,COLORRED;
  66. 绿色持币:0,LINETHICK0,COLOR00d900;
  67. DRAWICON(var19,ref(CLOSE,1)*0.99,7),ALIGN1;
  68. DRAWICON(var1A,ref(CLOSE,1)*1.02,8),ALIGN1;
  69. DRAWTEXTABS(2,5,'所属板块:'+BKNAME),COLORFF50FF,LINETHICK1;
  70. 流通盘大小:=FINANCE2(37)/1000000*100;
  71. DRAWTEXTABS(2,20,'流通盘大小:'+NUMTOSTRN(流通盘大小,2)+'亿'+' 电子盲制作'),LINETHICK1,COLORRED;
  72. 每股收益:=FINANCE2(3);
  73. 每股市盈率:=DYNAINFO(39);
  74. 每股净资产:=FINANCE2(4);
  75. 销售毛利率:=FINANCE2(12);
  76. 主营收入同比:=FINANCE2(11);
  77. 净利润同比增长:=FINANCE2(10);
  78. DRAWTEXTABS(160,35,'每股收益:'+NUMTOSTRN(每股收益,2)+'元'),COLOR00FF00;
  79. DRAWTEXTABS(160,50,'每股市盈率:'+NUMTOSTRN(每股市盈率,1)+'倍'),COLORRED;
  80. DRAWTEXTABS(160,65,'每股净资产:'+NUMTOSTRN(每股净资产,2)+'元'),COLORRED;
  81. DRAWTEXTABS(2,35,'销售毛利率:'+NUMTOSTRN(销售毛利率,2)+'%'),LINETHICK1,COLOR00FF00;
  82. DRAWTEXTABS(2,50,'主营收入同比增长:'+NUMTOSTRN(主营收入同比,2)+'%'),LINETHICK1,ColorYELLOW;
  83. DRAWTEXTABS(2,65,'净利润同比增长:'+NUMTOSTRN(净利润同比增长,2)+'%'),LINETHICK1,COLOR00FF00;
  84. DRAWTEXTABS(3,80,'历史最高价:'+HHV(HIGH,0)),Colorred;
  85. DRAWTEXTABS(3,95,'历史最低价:'+LLV(LOW,0)),ColorAFFF00;
  86. A4:=MA(CLOSE,20);
  87. A5:=(CLOSE > MA(CLOSE,5));
  88. A6:=(MA(CLOSE,5) > MA(CLOSE,10));
  89. A7:=(CLOSE > MA(CLOSE,10));
  90. A8:=(MA(CLOSE,5) > MA(CLOSE,20));
  91. A9:=(CLOSE > MA(CLOSE,20));
  92. A10:=ref(A4,1);
  93. A11:=(A4 > A10);
  94. AVX:=(((((IF(A5,10,(0 - 10)) + IF(A6,10,(0 - 10))) + IF(A7,10,(0 - 10))) + IF(A8,10,(0 - 10))) + IF(A9,10,(0 - 10))) + IF(A11,10,(0 - 10)));
  95. DSLX:=(CLOSE / INDEXC);
  96. DSLX1:=MA(DSLX,5);
  97. DSLX2:=MA(DSLX,10);
  98. V1:=MA(VOL,5);
  99. V2:=MA(VOL,10);
  100. 阻力位:=IF((CLOSE > 200),(CLOSE * 1.01),(CLOSE * 1.07));
  101. 阻力位1:=IF((CLOSE < 10),(CLOSE * 1.05),阻力位);
  102. 止损位:=IF((CLOSE > 200),(CLOSE * 0.99),(CLOSE * 0.93));
  103. 止损位1:=IF((CLOSE < 10),(CLOSE * 0.95),止损位);
  104. TJTS1:=BARSTATUS=2 and c<200;
  105. TJTS2:=BARSTATUS=2 and c>200;
  106. k2:=HHV(h,BARSLAST(DISPSTATUS=1)+1);
  107. DRAWTEXT(TJTS1 and((CROSS(AVX,1) AND (V1 >= V2)) AND (DSLX >= DSLX1)) ,k2*0.99,'该股的量能理想,有明显走强迹象,可以考虑中线进场参与,仓位在2/3左右。 '),ALIGN2,colorDC143C;
  108. DRAWTEXT(TJTS1 and((CROSS(AVX,1) AND (V1 < V2)) AND (DSLX >= DSLX1)) ,k2*0.99,'该股虽然走势趋强,但量能还显不足,可以考虑短线进场,仓位在1/2左右。 '),ALIGN2,colorDC143C;
  109. DRAWTEXT(TJTS1 and((CROSS(AVX,1) AND (V1 > V2)) AND (DSLX < DSLX1)) ,k2*0.99,'该股量价配合良好,但相对其它股票并没有明显走强,可以考虑短线进场,仓位1/2左右。 '),ALIGN2,colorDC143C;
  110. DRAWTEXT(TJTS1 and((CROSS(AVX,1) AND (V1 <= V2)) AND (DSLX < DSLX1)) ,k2*0.99,'该股形态尚可,但量能不足,股票也未完全走强,可以短线参与,仓位1/3左右。 '),ALIGN2,color0000FF;
  111. DRAWTEXT(TJTS1 and((CROSS(1,AVX) AND (V1 >= V2)) AND (DSLX >= DSLX1)) ,k2*0.99,'该股形态变坏,但走势相对其它股票尚可,重仓者减持大半,清仓者可以观望。 '),ALIGN2,color00FF00; {内容来至程序化交易网 CXH99.COM}
  112. DRAWTEXT(TJTS1 and((CROSS(1,AVX) AND (V1 < V2)) AND (DSLX >= DSLX1)) ,k2*0.99,'该股随大盘一起下跌,程明显缩量走势,考虑到大盘风险,减持或清仓。 '),ALIGN2,color00FF00;
  113. DRAWTEXT(TJTS1 and((CROSS(1,AVX) AND (V1 >= V2)) AND (DSLX < DSLX1)) ,k2*0.99,'该股放量下跌,走势明显偏弱,离场观望。 '),ALIGN2,color00FF00;
  114. DRAWTEXT(TJTS1 and((CROSS(1,AVX) AND (V1 < V2)) AND (DSLX < DSLX1)) ,k2*0.99,'该股缩量下跌,走势偏弱,离场观望。 '),ALIGN2,color00FF00;
  115. DRAWTEXT(TJTS1 and((((AVX >= 1) AND (ref(AVX,1) > 0)) AND (V1 >= V2)) AND (DSLX >= DSLX1)) ,k2*0.99,'该股形态良好,强势明显,量能充足,可以继续持有。 '),ALIGN2,color00FFFF;
  116. DRAWTEXT(TJTS1 and((((AVX >= 1) AND (ref(AVX,1) > 0)) AND (V1 < V2)) AND (DSLX >= DSLX1)) ,k2*0.99,'该股上行趋势不变,强势依然,但量能开始转弱,注意风险。 '),ALIGN2,color00FFFF; {本文来至程序化交易网 cxh99.com}
  117. DRAWTEXT(TJTS1 and((((AVX >= 1) AND (ref(AVX,1) > 0)) AND (V1 >= V2)) AND (DSLX < DSLX1)) ,k2*0.99,'该股仍然具备上涨潜力,但股性偏弱,可考虑减仓。 '),ALIGN2,color00FFFF;
  118. DRAWTEXT(TJTS1 and((((AVX >= 1) AND (ref(AVX,1) > 0)) AND (V1 < V2)) AND (DSLX < DSLX1)) ,k2*0.99,'该股走势趋弱,量能不足,减持大部分筹码。 '),ALIGN2,color00FFFF;
  119. DRAWTEXT(TJTS1 and((((AVX < 1) AND (ref(AVX,1) < 0)) AND (V1 >= V2)) AND (DSLX >= DSLX1)) ,k2*0.99,'该股形态不佳,注意成交量的变化,但目前不适合参与。 '),ALIGN2;
  120. DRAWTEXT(TJTS1 and((((AVX < 1) AND (ref(AVX,1) < 0)) AND (V1 < V2)) AND (DSLX >= DSLX1)) ,k2*0.99,'该股趋势不明,股价偏弱,注意量能变化,目前不宜参与。 '),ALIGN2;
  121. DRAWTEXT(TJTS1 and((((AVX < 1) AND (ref(AVX,1) < 0)) AND (V1 >= V2)) AND (DSLX < DSLX1)) ,k2*0.99,'该股有走强迹象,但量能不足,趋势不明,不适合操作。 '),ALIGN2;
  122. DRAWTEXT(TJTS1 and((((AVX < 1) AND (ref(AVX,1) < 0)) AND (V1 < V2)) AND (DSLX < DSLX1)) ,k2*0.99,'该股走势太弱,没有参与价值。 '),ALIGN2;
  123. DRAWTEXT(TJTS2 and(CROSS(AVX,1) AND (V1 >= V2)) ,k2*0.99,'大盘量能理想,有明显走强迹象,可以考虑中线进场参与,仓位在2/3左右, '),ALIGN2,color0000FF;
  124. DRAWTEXT(TJTS2 and(CROSS(AVX,1) AND (V1 >= V2)) ,k2*0.98,' 如前期经过一轮下跌,此时为最佳买点,但如果前期有过一段涨幅则介入需谨慎。 '),ALIGN2,color0000FF;
  125. DRAWTEXT(TJTS2 and(CROSS(AVX,1) AND (V1 < V2)) ,k2*0.99,'大盘虽然走势趋强,但量能还显不足,如果前期经过一轮下跌, '),ALIGN2,color0000FF;
  126. DRAWTEXT(TJTS2 and(CROSS(AVX,1) AND (V1 < V2)) ,k2*0.98,' 可以考虑短线进场,仓位在1/2左右,一旦量能放大可以加仓买入。 '),ALIGN2,color0000FF;
  127. DRAWTEXT(TJTS2 and(CROSS(1,AVX) AND (V1 >= V2)) ,k2*0.99,'大盘形态走坏,重仓者可以减去大部分仓位。 '),ALIGN2,color00FF00;
  128. DRAWTEXT(TJTS2 and(CROSS(1,AVX) AND (V1 < V2)) ,k2*0.99,'大盘缩量调整,注意风险,短线清仓观望。 '),ALIGN2,color00FF00;
  129. DRAWTEXT(TJTS2 and(((AVX >= 1) AND (ref(AVX,1) > 0)) AND (V1 >= V2)) ,k2*0.99,'大盘走势良好,量能理想,可以继续持有强势股。 '),ALIGN2,color00FFFF;
  130. DRAWTEXT(TJTS2 and(((AVX >= 1) AND (ref(AVX,1) > 0)) AND (V1 < V2)) ,k2*0.99,'大盘形态良好,但量能稍显不足,随时准备减仓。 '),ALIGN2,color00FFFF;
  131. DRAWTEXT(TJTS2 and(((AVX < 1) AND (ref(AVX,1) < 0)) AND (V1 >= V2)) ,k2*0.99,'大盘趋势不明,注意成交量变化,目前不适宜进场。 '),ALIGN2;
  132. DRAWTEXT(TJTS2 and(((AVX < 1) AND (ref(AVX,1) < 0)) AND (V1 < V2)) ,k2*0.99,'大盘趋势向下,量能萎缩,不适合进场。 '),ALIGN2;
复制代码


论坛官方微信、群(期货热点、量化探讨、开户与绑定实盘)
 
期货论坛 - 版权/免责声明   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

返回列表