See attached image. My code draws highs for prior days however I only want a single line drawn for each day, at the moment it draws a new line every time a new high is acheived. I dont know how to get it t0 draw a single highest high line for each day.
//defparam drawonlastbaronly=true
//test = Yesterday/100
//defparam drawonlastbaronly=true
test = DHigh(0)
starttime = 110300 // 08h00
endtime = 160300 // 09h00
if day<>day[1] then
startbar=barindex
endif
if time = starttime then
startbar = barindex
endif
if time = endtime then
endbar = barindex
endif
voffset = pipsize*1.2
//DRAWTEXT(test, barindex, high+Voffset, Dialog,Standard, 20) COLOURED(255,255,255)
drawsegment(startbar,DHigh(0),barindex,DHigh(0))coloured(128,128,128)
RETURN //test as "prior day high"
Uncomment line 1.
Line 4 can be commented out as TEST is not used.