CS2726
error name is not an input of this script.
#What it means
A settings check or migration names something that is not an input of this script. Checks attach to inputs ({ on: [...] }) and migrations move inputs' saved values, so they need real input variables.
#Typical cause
- A plain variable or constant in
on: [...]. - A migration for an input name that does not exist.
#How to fix it
Name only variables that hold an input.* call.
#Example
//@chartscript 1
indicator("Lengths")
const len = input.int(14, "Length")
const fast = 5
settings.validate(len > fast, "Length must be above 5", { on: [fast] })
plot(ta.sma(close, len))Fixed
//@chartscript 1
indicator("Lengths")
const len = input.int(14, "Length")
const fast = 5
settings.validate(len > fast, "Length must be above 5", { on: [len] })
plot(ta.sma(close, len))