I´m trying to recode expr to Pinescript v5 but doesn't work same way, any idea?
Pinescript v2:
MA2 = nz(MA2[1]) + smooth * (hlc3 - nz(MA2[1]))
Pinescript v5:
float nAMA = 0.
MA := nz(MA[1]) + smooth * (hlc3 - nz(MA[1]))
Replace
float nAMA = 0.
By
float MA = 0.