Hi All
I hope that you will be able to help me.
I am using the standard rectangle code form the site to define a range but need to make the following changes and don’t know how.
a) time to role over midnight or daily close, ( not sure if it is the close of day or midnight that is not allowing it to print the rectangle).
b ) Use the body’s of the candles from a selected timeframe ( 1 hr ) rather than the wicks to define the range.
Many thanks in advance.
Paul
starttime = 140000
endtime = 190000
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)coloured(255,10,10)
alreadydrawn=1
endif
RETURN