Why doesnt Highest allow me to use intradaybarindex as the bar count? It keeps throwing an error saying it needs a positive integer.
Defparam DrawOnLastBarOnly = true
//defparam calculateonlastbars = 1000
nm = Intradaybarindex
mx = Highest[nm](close)
drawsegment(barindex[nm],mx,barindex,mx)
drawsegment(barindex[nm],low,barindex,low)
DRAWTEXT(intradaybarindex, barindex + 5, high, Dialog, Bold, 30) COLOURED(128,128,128)
return
No index can be lower than 1, so change line 4 to make sure it is at least 1:
nm = max(1,Intradaybarindex)