Skip to content
ChartDeck ChartScript docs Account Open the terminal

CS1033

error Expected the end of the statement.

#What it means

The statement was complete, but more text followed on the same line. Only scripts in the earlier syntax (saved before ChartScript moved to its current, brace-based syntax) can show it; the editor converts such a script to the current syntax when you open it, after which this cannot happen. In the current syntax the same mistake is CS1057.

#Typical cause

  • Two statements on one line.
  • A missing operator between two values, as in close open.
  • A missing comma between arguments.

#How to fix it

Add the missing operator or comma, or put each statement on its own line (or separate them with ;).

#Example

In the earlier syntax

ChartScriptError: CS1033
//@chartscript 1
indicator("Body size")
body = close open
plot(body)

Fixed (the current syntax)

ChartScriptOpen in editor
//@chartscript 1
indicator("Body size")
const body = close - open
plot(body)
  • CS1057 — Expected ; or a new line before found.
  • CS1032 — Expected an expression.
  • CS1030 — Expected expected but found found.

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