I'm getting the following error when converting to study:
kdiddydawgy
⋅
line 39: Shadowing built-in variable 'obv'
line 39: The function 'change' should be called on each calculation for consistency. It is recommended to extract the call from the ternary operator or from the scope.
capissimo
⋅
@kdiddydawg, since this script was published Pine has received several new built-in variables and functions, and obv is one of them. Change it to obvvar, for instance.
Also, insert the following variable: changed = change(price) just before the obvvar calculation. Thx again for your support)). I updated the sxcript, though.
capissimo
⋅
To eliminate repainting it is recommended to use these lines in the getdiff function:
curr = scaleMinimax((useold ? security(syminfo.tickerid, tostring(tf), hlc3[1], barmerge.gaps_off, barmerge.lookahead_on)
: security(syminfo.tickerid, tostring(tf), hlc3[1])), tf, 0, 1)
Here hlc3 is substituted with the previous value, i.e. hlc3[1]
capissimo
⋅
@capissimo, hlc3 then the opening brackets then 1 then the closing brackets (i don't know why, but the commenting subsystem deletes the brackets))