CS2009
error name is not a function.
#What it means
Something is called with ( ) as if it were a function, but it is a value such as a variable or a built-in series.
#Typical cause
- A variable with the same name as a function you meant to call.
- Parentheses after a built-in variable, as in
close()orbar_index().
#How to fix it
Remove the parentheses to use the value, or call the right function. If a variable hides a function you need, rename the variable.
#Example
//@chartscript 1
indicator("Length")
const len = 14
plot(len(close))Fixed
//@chartscript 1
indicator("Length")
const len = 14
plot(ta.sma(close, len))