开启左侧

增强版MACD波段副图指标 通达信 源码

[复制链接]
  1. SJ:=IF(DATE+19000000<20200417,1,0);
  2. {+4天上方时间为准}

  3. DIFFF:=EMA(CLOSE,12)*SJ-EMA(CLOSE,26);
  4. DEAAA:=EMA(DIFFF,9);
  5. MACD2:=2*(DIFFF-DEAAA);
  6. (CLOSE<0 AND CROSS(DIFFF,0),H*1.3),COLOR000080,NODRAW;
  7. (CLOSE<0 AND CROSS(MACD2,0),H*1.3),COLOR000080,NODRAW;
  8. (CLOSE<0 AND CROSS(0,DIFFF),H*1.3),COLOR808080,NODRAW;
  9. (CLOSE<0 AND CROSS(0,MACD2),H*1.3),COLOR808080,NODRAW;

  10. DU0:=CROSS(DIFFF,0);
  11. UD0:=CROSS(0,DIFFF);
  12. TDU0:=BARSLAST(DU0);
  13. TUD0:=BARSLAST(UD0);
  14. DU3:=REF(DU0,1);
  15. UD3:=REF(UD0,1);
  16. TDU3:=BARSLAST(DU3);
  17. TUD3:=BARSLAST(UD3);
  18. UDGLINE:=IF(TDU3<TUD3,REF(HHV(HIGH,2),TDU3),REF(LLV(LOW,2),TUD3));
  19. JDU0:=REF(CLOSE,1)<=REF(UDGLINE,1) AND CLOSE>UDGLINE AND TDU0<TUD0;
  20. JUD0:=REF(CLOSE,1)>=REF(UDGLINE,1) AND CLOSE<UDGLINE AND TUD0<TDU0;
  21. JDU1:=JDU0 AND COUNT(JDU0,TDU0)=1;
  22. JUD1:=JUD0 AND COUNT(JUD0,TUD0)=1;
  23. JDU2:=JDU1 AND REF(BARSLAST(JUD1),1)<REF(BARSLAST(JDU1),1);
  24. JUD2:=JUD1 AND REF(BARSLAST(JUD1),1)>REF(BARSLAST(JDU1),1);
  25. JDU3:=JDU1 AND REF(BARSLAST(JUD1),1)>REF(BARSLAST(JDU1),1);
  26. JUD3:=JUD1 AND REF(BARSLAST(JUD1),1)<REF(BARSLAST(JDU1),1);
  27. BSLINE:=IF(BARSLAST(JDU2)<BARSLAST(JUD2),IF(REF(CROSS(0,MACD2),1),LLV(LOW,2),REF(LLV(LOW,2),BARSLAST(REF(CROSS(0,MACD2),1)))),IF(REF(CROSS(MACD2,0),1),HHV(HIGH,2),REF(HHV(HIGH,2),BARSLAST(REF(CROSS(MACD2,0),1)))));
  28. {}
  29. STICKLINE(MACD2>=0,0,MACD2,2,0),COLORYELLOW;{0轴上升}
  30. STICKLINE(MACD2>=0 AND MACD2<REF(MACD2,1),0,MACD2,2,1),COLORCYAN;{0轴上跌}
  31. STICKLINE(MACD2<0,0,MACD2,2,0),COLORCYAN;{0轴下跌}
  32. STICKLINE(MACD2<0 AND MACD2>REF(MACD2,1),0,MACD2,2,1),COLORYELLOW;{0轴下升}
  33. 0,DOTLINE,COLORGRAY;
  34. MID:=(7*CLOSE+LOW+OPEN+HIGH)/10;
  35. MA0:=MA(MID,40);
  36. MA1:=MA(MID,1);
  37. A1:=MA1-MA0;
  38. MA2:=MA(MID,2);
  39. A2:=MA2-MA0;
  40. MA3:=MA(MID,3);
  41. A3:=MA3-MA0;
  42. MA4:=MA(MID,4);
  43. A4:=MA4-MA0;
  44. MA5:=MA(MID,5);
  45. A5:=MA5-MA0;
  46. MA6:=MA(MID,6);
  47. A6:=MA6-MA0;
  48. MA7:=MA(MID,7);
  49. A7:=MA7-MA0;
  50. MA8:=MA(MID,8);
  51. A8:=MA8-MA0;
  52. MA9:=MA(MID,9);
  53. A9:=MA9-MA0;
  54. MA10:=MA(MID,10);
  55. A10:=MA10-MA0;
  56. MA11:=MA(MID,11);
  57. A11:=MA11-MA0;
  58. MA12:=MA(MID,12);
  59. A12:=MA12-MA0;
  60. MA13:=MA(MID,13);
  61. A13:=MA13-MA0;
  62. MA14:=MA(MID,14);
  63. A14:=MA14-MA0;
  64. MA15:=MA(MID,15);
  65. A15:=MA15-MA0;
  66. MA16:=MA(MID,16);
  67. A16:=MA16-MA0;
  68. MA17:=MA(MID,17);
  69. A17:=MA17-MA0;
  70. MA18:=MA(MID,18);
  71. A18:=MA18-MA0;
  72. MA19:=MA(MID,19);
  73. A19:=MA19-MA0;
  74. MA20:=MA(MID,20);
  75. A20:=MA20-MA0;
  76. MA21:=MA(MID,21);
  77. A21:=MA21-MA0;
  78. MA22:=MA(MID,22);
  79. A22:=MA22-MA0;
  80. MA23:=MA(MID,23);
  81. A23:=MA23-MA0;
  82. MA24:=MA(MID,24);
  83. A24:=MA24-MA0;
  84. MA25:=MA(MID,25);
  85. A25:=MA25-MA0;
  86. MA26:=MA(MID,26);
  87. A26:=MA26-MA0;
  88. MA27:=MA(MID,27);
  89. A27:=MA27-MA0;
  90. MA28:=MA(MID,28);
  91. A28:=MA28-MA0;
  92. MA29:=MA(MID,29);
  93. A29:=MA29-MA0;
  94. MA30:=MA(MID,30);
  95. A30:=MA30-MA0;
  96. MA31:=MA(MID,31);
  97. A31:=MA31-MA0;
  98. MA32:=MA(MID,32);
  99. A32:=MA32-MA0;
  100. MA33:=MA(MID,33);
  101. A33:=MA33-MA0;
  102. MA34:=MA(MID,34);
  103. A34:=MA34-MA0;
  104. MA35:=MA(MID,35);
  105. A35:=MA35-MA0;
  106. MA36:=MA(MID,36);
  107. A36:=MA36-MA0;
  108. MA37:=MA(MID,37);
  109. A37:=MA37-MA0;
  110. MA38:=MA(MID,38);
  111. A38:=MA38-MA0;
  112. MA39:=MA(MID,39);
  113. A39:=MA39-MA0;
  114. MA40:=MA(MID,40);
  115. A40:=MA40-MA0;
  116. LC:=(A6+A7+A8+A9+A10+A11+A12+A13+A14+A15+A16+A17+A18+A19+A20)/15,LINETHICK0;
  117. VAR1:=LC;
  118. VAR2:=REF(LC,1);
  119. VAR3:=VAR1>VAR2 AND REF(LC,1)<REF(LC,2);
  120. VAR4:=VAR1<VAR2 AND REF(LC,1)>REF(LC,2);
  121. 均线发散:STICKLINE(VAR1>VAR2,LC,REF(LC,1),3,0),COLORRED;
  122. 均线粘合:STICKLINE(VAR1<VAR2,LC,REF(LC,1),3,0),COLORGREEN;
  123. EMA5:MA(VAR1,5),COLORWHITE;
  124. EMA10:MA(VAR1,10),COLORYELLOW;
  125. DIFF:=EMA(CLOSE,21)-EMA(CLOSE,34);
  126. DEAA:=EMA(DIFF,8);
  127. MACDD:=8*(DIFF-DEAA);
  128. MARDD:=SMA(MACDD,2,1);
  129. {STICKLINE(MACDD>MARDD,MACDD,MARDD,1.8,0),COLORMAGENTA;
  130. STICKLINE(MACDD<MARDD,MACDD,MARDD,1.8,0),COLORFF8000;};

  131. YJD:=IF(DATE+19000000>20200413,1,0);
  132. DRAWTEXT_FIX(ISLASTBAR=1 AND YJD,0.1,0.2,0,' 请联系QQ25950610免费获取最新版。'),COLORYELLOW;
复制代码

增强版MACD波段副图指标 通达信

增强版MACD波段副图指标 通达信

回复
0

使用道具 举报

懒得打字嘛,点击右侧快捷回复 【右侧内容,后台自定义】
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ- Archiver-手机版-小黑屋- 与你共享  

Powered by YNJIE.COM X3.3© 2001-2013 与你共享街.  滇ICP备19007624号-1