How can I write an mt4 indicator that draws a rectangle and horizontal lines over first 6 hours of hourly candles

核能气质少年 提交于 2020-01-24 09:20:12

问题


I am a quite new to mql4 coding. I would like to know how I write an indicator that does the following, based on the image below:

  1. Draw a rectangle over the current day hour chart that covers the highest and lowest price points of the first 6 hours (candles)

  2. Draw two horizontal lines along the highest and lowest points found 1.

Please note that 1. and 2. should be based strictly on the hourly period and shouldn't vary with the selected period.

I believe I'm suppose to be using ObjectCreate() with OBJ_RECTANGLE and OBJ_HLINE but the whole concept is quite new to me. I would really appreciate some assistance.

来源:https://stackoverflow.com/questions/53397898/how-can-i-write-an-mt4-indicator-that-draws-a-rectangle-and-horizontal-lines-ove

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!