CS2716
error The preset preset gives name the value value, which the input does not allow.
#What it means
A preset gives an input a value the input itself would not accept: outside its minval / maxval, not in its options, or of the wrong type.
#Typical cause
- A preset written before the input's limits were tightened.
#How to fix it
Change the preset value to one the input allows, or widen the input's limits.
#Example
//@chartscript 1
indicator("Presets")
const len = input.int(14, "Length", { minval: 2, maxval: 200 })
settings.preset("Fast", { len: 1 })
plot(ta.sma(close, len))Fixed
//@chartscript 1
indicator("Presets")
const len = input.int(14, "Length", { minval: 2, maxval: 200 })
settings.preset("Fast", { len: 5 })
plot(ta.sma(close, len))