Hi Nicolas, in addition to my pending post in the Indicator section, I have a problem I hope you can help me with- because after two days I have given up. I discovered that the DRAWSEGMENT is not updating Live, but stops the moment you put on the indicator, I suspect it’s the same problem with the drawrectangle(?) though I haven’t been able to live test the drawrectangle between 8 and 9 am. I also change the code a bit from the pending post- I think we need to solve this issue first before releasing the indicator post. Also the stop time is not correct. if time 135000 the yesterdays draw of the segment stops at 220000?
Cheers Kasper
defparam drawonlastbaronly = false
once upper=0
once lower=0
starttime = 080000
endtime = 090000
If Time = endtime then
upper=highest[12](high)
lower=lowest[12](low)
dif=round(abs((lower-upper)*pipsize*pointvalue))
//bars=barindex
DRAWTEXT("#dif# pips", barindex-6, upper+10,SansSerif,bold, 16)
DRAWARROWDOWN (barindex-6,upper+5)
DRAWARROWup (barindex-6,upper+15)
DRAWTEXT("#upper#", barindex-6, upper,SansSerif,bold, 16)
DRAWTEXT("#lower#", barindex-6, lower,SansSerif,bold, 16)
endif
//if time >=080500 and Time <=090000 then
////backgroundcolor(0,255,255)
//DRAWRECTANGLE(barindex-6,upper,barindex-6,lower) COLOURED(0,255,0)
//endif
if time >=090000 and Time <=135000 then
count=count+1
DRAWsegment(barindex,upper,barindex+count,upper)coloured(0,0,0)
DRAWsegment(barindex,lower,barindex+count,lower)coloured(0,0,0)
else
count=0
endif
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(0,255,255)
alreadydrawn=1
endif
RETURN