Hi
I’m trying to get the highest close and lowest close of the day so far.
So I can use the code below to get the low and high so far today but I would like to get the close of the highest and lowest candle today.
TodaysLow = DLow(0)
TodaysHigh = DHigh(0)
DailyClose = DClose(0)
Can anyone help please?
Thanks
Rob
That code would do the trick (not tested, please give feedback):
if intradaybarindex=0 then
hh=0
ll=close*100
endif
hh=max(hh,high)
ll=min(ll,low)
if hh<>hh[1] then
hclose=close[1]
endif
if ll<>ll[1] then
lclose=close[1]
endif
return hclose,lclose
Hi Nicolas,
Thanks but it doesn’t seem to be quite there. See attached.
Can it be tweaked?
Thanks
Rob