help me to convert below pine script 3 lines in version 5.(below lines are in version 2)
src=ohlc4
haOpen = (src + nz(haOpen[1]))/2
haC=(ohlc4+haOpen+max(high,haOpen)+min(low,haOpen))/4
try to convert pine script version 2 to version 5
help me to convert below pine script 3 lines in version 5.(below lines are in version 2)
src=ohlc4
haOpen = (src + nz(haOpen[1]))/2
haC=(ohlc4+haOpen+max(high,haOpen)+min(low,haOpen))/4
try to convert pine script version 2 to version 5
Self-referenced variables are removed
So, you need to first define the variable and use
:=
to assign a value to it.