Skip to content
ChartDeck ChartScript docs Account Open the terminal

CS1057

error Expected ; or a new line before found.

#What it means

A statement was complete, but more text followed on the same line. Two statements on one line need a ; between them.

#Typical cause

  • Two statements on one line without ;.
  • 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 the second statement on its own line (or after a ;).

#Example

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

Fixed

ChartScriptOpen in editor
//@chartscript 1
indicator("Body size")
const body = close - open
plot(body)
  • CS1032 — Expected an expression.
  • CS1030 — Expected expected but found found.
  • CS1055 — This line starts with op: put the operator at the end of the previous line, or wrap the expression in parentheses.

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