交易危机

 找回密码
 快捷注册(禁q号)

QQ登录

只需一步,快速开始

搜索
广告位
查看: 7561|回复: 4

[其他] 副图的反K线指标,现在只一步了,懂mql4的帮忙改下指标

[复制链接]

110

主题

6929

积分

0

精华

高级操盘手

金钱
6929 美元
权重
132
发表于 2014-4-11 09:21 | 显示全部楼层 |阅读模式
想要弄个副图的反K线指标,现在只一步了:0轴到min(Open,Close)的柱状线画成黑色, 从而去掉K线实体之外的颜色
对mql4的这句不知道怎么处理,懂的帮下忙,先谢谢!
目前是成这样子:
11.png
下面是代码:

  1. #property indicator_separate_window
  2. #property indicator_buffers 4
  3. #property indicator_color1 RoyalBlue
  4. #property indicator_color2 OrangeRed
  5. #property indicator_color3 RoyalBlue
  6. #property indicator_color4 OrangeRed
  7. //#property indicator_color3 Yellow
  8. //---- buffers
  9. double ExtMapBuffer1[];
  10. double ExtMapBuffer2[];
  11. double ExtMapBuffer3[];
  12. double ExtMapBuffer4[];
  13. int n;
  14. int ExtCountedBars=0;
  15. int init()
  16. {
  17. //---- indicators
  18. SetIndexStyle(0,DRAW_HISTOGRAM,STYLE_SOLID,3);
  19. SetIndexBuffer(0, ExtMapBuffer1);
  20. SetIndexStyle(1,DRAW_HISTOGRAM,STYLE_SOLID,3);
  21. SetIndexBuffer(1, ExtMapBuffer2);
  22. SetIndexStyle(2,DRAW_HISTOGRAM,STYLE_SOLID,1);
  23. SetIndexBuffer(2, ExtMapBuffer3);
  24. SetIndexStyle(3,DRAW_HISTOGRAM,STYLE_SOLID,1);
  25. SetIndexBuffer(3, ExtMapBuffer4);
  26. return(0);
  27. }
  28. int deinit()
  29. {
  30. //----
  31. return(0);
  32. }
  33. int start()
  34. {
  35. if(Bars<=10) return(0);
  36. int pos=0;
  37. n=WindowBarsPerChart();
  38. while(pos<n)
  39. {
  40.    ExtMapBuffer1[pos]=-1*Open[pos];
  41.    ExtMapBuffer2[pos]=-1*Close[pos];
  42.    
  43.    if (Open[pos]<=Close[pos])
  44.    {
  45.       ExtMapBuffer3[pos]=-1*Low[pos];
  46.       ExtMapBuffer4[pos]=-1*High[pos];
  47.    }
  48.    else
  49.    {
  50.       ExtMapBuffer4[pos]=-1*Low[pos];
  51.       ExtMapBuffer3[pos]=-1*High[pos];
  52.    }
  53. pos++;
  54. }
  55. //----
  56. return(0);
  57. }
  58. //+------------------------------------------------------------------+
复制代码


副图反k.mq4 (2.59 KB, 下载次数: 0)

352

主题

7816

积分

3

精华

高级操盘手

金钱
7816 美元
权重
224
发表于 2014-4-11 10:07 | 显示全部楼层
本帖最后由 wccmcd 于 2015-12-4 12:49 编辑

不懂,帮你顶,高手快快出现

110

主题

6929

积分

0

精华

高级操盘手

金钱
6929 美元
权重
132
 楼主| 发表于 2014-4-11 11:54 | 显示全部楼层
本帖最后由 wccmcd 于 2015-12-4 12:49 编辑

自己顶下~~

0

主题

110

积分

0

精华

见习操盘手

金钱
110 美元
权重
20
发表于 2014-4-11 14:57 | 显示全部楼层
本帖最后由 wccmcd 于 2015-12-4 12:49 编辑

这图形看着复杂了那么点点,简单就好,个人感悟

3

主题

296

积分

0

精华

见习操盘手

金钱
296 美元
权重
0
发表于 2022-8-28 15:01 | 显示全部楼层
不懂,帮你顶
您需要登录后才可以回帖 登录 | 快捷注册(禁q号)

本版积分规则

QQ|黄金吧|黄金论坛|手机版|指标下载|非农|目录|交易危机

版权所有: ©2014-2021 fx3q.com Powered by Discuz! X3
浙ICP备: ICP14039028

浙公网安备 33011802001420号

风险提示:杠杆风险高,交易要谨慎 声明:坛友发言和回复均为个人观点,不代表论坛立场。
若有侵权请联系fx3q@qq.com删除

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