why plot(p.x)
behaves differently from plot(y)
(please see the comments in the script below):
//@version=5
indicator("My script")
type pp
float x
p = pp.new(1)
p.x :=1
y = 5
plot(p.x) // plots 1
plot(y) // plots 5
p.x:=2
y := 6
plot(p.x) // plots 1, not 2. Why?
plot(y) // plots 6