Skip to content
ChartDeck ChartScript docs Account Open the terminal

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

ChartScriptError: CS2726
//@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

ChartScriptOpen in editor
//@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))
  • CS2715 — The preset preset names name, which is not an input of this script.
  • CS2717 — This migration conflicts with another one for name (version since).
  • CS2714 — A check must be a bool, but this is got.

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