How can I write an mt4 indicator that draws a rect

2019-07-03 23:05发布

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.

enter image description here

0条回答
登录 后发表回答