Indeed, there is sometimes strange behaviour of the code, coming from constants like Dopen or Dlow, I can replicate with the below code:
defparam drawonlastbaronly = true
//vertical offset to draw text correctly over horizontal lines
//Voffset = 5*pipsize
Voffset = 0// -3*pipsize
textloc=barindex
//yesterday's value
highhtf = DHigh(1)
lowhtf = DLow(1)
closehtf=DClose(1)
//Camarilla Pivot Point
P = (highhtf + lowhtf + closehtf)/3
RP= round(P)
DRAWTEXT(" CPiv #RP#",textloc,RP,SansSerif,Bold,11)//coloured(255,0,128)
DRAWHLINE(RP)
DRange = highhtf - lowhtf
H5 = round((highhtf / lowhtf) * closehtf) // Breakout Target
H4 = round(closehtf + DRange * 1.1/2) // Bullish Breakout
H3 = round(closehtf + DRange * 1.1/4) // Sell Reversal
//H2 = round(closehtf + DRange * 1.1/6)
//H1 = round(closehtf + DRange * 1.1/12)
//L1 = round(closehtf - DRange * 1.1/12)
//L2 = round(closehtf - DRange * 1.1/6)
L3 = round(closehtf - DRange * 1.1/4) // Buy Reversal
L4 = round(closehtf - DRange * 1.1/2) // Bearish Breakout
L5 = round(closehtf - (H5 - closehtf)) // Bearish Target
//draw pivot points text
DRAWTEXT(" BOT-H5 #H5#",textloc,H5+Voffset,SansSerif,Bold,12)coloured(255,0,128)
DRAWTEXT(" BBO-H4 #H4#",textloc,H4+Voffset,SansSerif,Bold,12)coloured(0,200,0)
DRAWTEXT(" SR-H3 #H3#",textloc,H3+Voffset,SansSerif,Bold,12)coloured(255,0,0)
DRAWTEXT(" BR-L3 #L3#",textloc,L3+Voffset,SansSerif,Bold,12)//coloured(0,255,255)
DRAWTEXT(" SBD-L4 #L4#",textloc,L4+Voffset,SansSerif,Bold,12)coloured(255,0,128)
DRAWTEXT(" BDT-L5 #L5#",textloc,L5+Voffset,SansSerif,Bold,12)coloured(0,255,128)
//draw pivot points lines with extension
DRAWSEGMENT(barindex-4,H5,barindex,H5) //coloured(255,0,255)
DRAWSEGMENT(barindex-4,H4,barindex,H4) //coloured(255,0,255)
DRAWSEGMENT(barindex-4,H3,barindex,H3) //coloured(255,0,255)
DRAWSEGMENT(barindex-4,L3,barindex,L3) //coloured(0,255,255)
DRAWSEGMENT(barindex-4,L4,barindex,L4) //coloured(0,255,255)
DRAWSEGMENT(barindex-4,L5,barindex,L5) //coloured(0,255,255)
RETURN highhtf ,lowhtf ,closehtf
I will ask what cause this issue, please feel free to launch a suppor ticket with a link to this thread, I’ll do the same. Thanks.