Skip to content
ChartDeck ChartScript docs Account Open the terminal

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

ChartScriptError: CS2715
//@chartscript 1
indicator("Presets")
const len = input.int(14, "Length")
settings.preset("Fast", { length: 7 })
plot(ta.sma(close, len))

Fixed

ChartScriptOpen in editor
//@chartscript 1
indicator("Presets")
const len = input.int(14, "Length")
settings.preset("Fast", { len: 7 })
plot(ta.sma(close, len))
  • CS2716 — The preset preset gives name the value value, which the input does not allow.
  • CS2726 — name is not an input of this script.

The ChartScript documentation is in English for now; translations will follow.