CS2715
error The preset preset names name, which is not an input of this script.
#What it means
A preset (settings.preset) sets inputs by the names of the variables that hold them. This preset names something that is not an input of the script.
#Typical cause
- Using the input's title (
"Length") or another name instead of its variable name (len). - An input that was renamed or removed.
#How to fix it
Use the variable name of the input, exactly as in const len = input.int(...).
#Example
//@chartscript 1
indicator("Presets")
const len = input.int(14, "Length")
settings.preset("Fast", { length: 7 })
plot(ta.sma(close, len))Fixed
//@chartscript 1
indicator("Presets")
const len = input.int(14, "Length")
settings.preset("Fast", { len: 7 })
plot(ta.sma(close, len))