2 years ago
#67930
Stackoverflower
Undeclared identifier in pine script compiling error
I got an undeclared identifier error for the following Pine Script script, but don't know why.
//@version=4
study("NAME")
plot(close)
var A = array.new_int(0)
var B = array.new_int(0)
if (true)
if (true)
y = array.get(B, 0)
if(true)
box.delete(box.new(1,1,1,1))
array.push(A, 1)
else
array.push(A, 1)
y = array.get(A, 0)
The error:
"line 12: Undeclared identifier 'B';
line 17: Variable 'y' is not found in scope 'global_#0_#0', cannot register side effect"
pine-script
pine-script-v4
0 Answers
Your Answer