I would like to be able at present candle to use the value of the previous PH. Using the function 1 it would address the value of the previous bar which in this case would be the same as the present candle.
Thanks
ph = pivothigh(close, 50, 50)
var phe = 0.0
if ph
phe := ph
plot(phe, "PH")

