Skip to content
ChartDeck ChartScript docs Account Open the terminal

CS1002

error ChartScript version version is not known to this compiler (newest: max).

#What it means

The header asks for a ChartScript version this compiler does not know. The message names the newest version it supports.

#Typical cause

  • A typo in the header, such as //@chartscript 2.
  • A script copied from somewhere that uses a newer or invented version number.

#How to fix it

Change the header to //@chartscript 1, the current version.

#Example

ChartScriptError: CS1002
//@chartscript 2
indicator("Close line", { overlay: true })
plot(close)

Fixed

ChartScriptOpen in editor
//@chartscript 1
indicator("Close line", { overlay: true })
plot(close)
  • CS1001 — The first line must be //@chartscript 1

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