Skip to content
ChartDeck ChartScript docs Account Open the terminal

CS1032

error Expected an expression.

#What it means

The compiler expected a value or an expression here, but the line ended or a symbol appeared that cannot start one.

#Typical cause

  • An empty spot inside brackets, as in (high + low) / ).
  • An empty argument, as in f(a, , b).
  • => with nothing after it.

#How to fix it

Complete the expression. A long expression can continue on the next line when the line ends with an operator or inside an open bracket.

#Example

ChartScriptError: CS1032
//@chartscript 1
indicator("Midpoint")
const mid = (high + low) / )
plot(mid)

Fixed

ChartScriptOpen in editor
//@chartscript 1
indicator("Midpoint")
const mid = (high + low) / 2
plot(mid)
  • CS1030 — Expected expected but found found.
  • CS1033 — Expected the end of the statement.

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