Hi all,
This is likely very basic for those that can. I am looking for a box indicator that shows the high and low of a range (adjustable times). For examples sake lets say ) 00:00 – 06:00. and that can show historical data too. Some of the historical data indicators ive seen ‘connect’ from day to day, I would like for each days box to be independent if possible.
Can anyone help?
Many thanks.
It’s possible for historical data, but the box of the current day will appear at 06:01, is it a problem?
Hi Nicolas,
Thanks for the reply! The box appearing at 6.01 would not be an problem. Would it be possible to have adjustable times for the box range?
Here is the code to draw rectangle between 2 schedules. Please let us know if it looks how you expect. Thank you.
starttime = 050000
endtime = 090000
if intradaybarindex=0 then
hh = 0
ll = 0
alreadydrawn = 0
endif
if time=starttime then
startbar=barindex
endif
if time=endtime then
endbar=barindex
endif
if time>=starttime and time<=endtime then
if high>hh then
hh = high
endif
if low<ll or ll=0 then
ll = low
endif
endif
if time>endtime and alreadydrawn=0 then
drawrectangle(startbar,hh,endbar,ll)
alreadydrawn=1
endif
RETURN
Hi Nicolas,
Thank you for the code. It’s basically what I’d like however there are two things I wonder if you can modify?
1.Box range able to go over the midnight period. For example 22:00 – 07:00
2. Functionality to change line and box fill colour
Many thanks!
One final thing can it only display H1 and lower timeframe?
Also on M5 timeframe and H1 it seem’s to draw oddly.
Many thanks