Skip to content
ChartDeck ChartScript docs Account Open the terminal

CS2720

error The id id is used twice (what).

#What it means

Ids of tabs, sections, rows, named styles and variants must be unique within their kind. This id is used twice; the message says for what.

#Typical cause

  • A section or tab copied and pasted without changing its id.

#How to fix it

Give each one its own id.

#Example

ChartScriptError: CS2720
//@chartscript 1
indicator("Sections")
settings.section("main", "Main")
const len = input.int(14, "Length")
settings.section("main", "Colours")
const col = input.color(color.blue, "Line")
plot(ta.sma(close, len), { color: col })

Fixed

ChartScriptOpen in editor
//@chartscript 1
indicator("Sections")
settings.section("main", "Main")
const len = input.int(14, "Length")
settings.section("colours", "Colours")
const col = input.color(color.blue, "Line")
plot(ta.sma(close, len), { color: col })
  • CS2721 — A script can have at most max what.
  • CS2718 — The id of what changed from was to now since the previous version; saved styles for it will be lost. Give it the id "was" again to keep them.

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