Skip to content
ChartDeck ChartScript docs Account Open the terminal

CS1055

error This line starts with op: put the operator at the end of the previous line, or wrap the expression in parentheses.

#What it means

A line that starts with + or - always starts a new statement in ChartScript, so it cannot continue the expression on the line above. A statement that is only + value does nothing, so the compiler reports it instead of ignoring it.

#Typical cause

  • A long expression broken before an operator, with the operator at the start of the next line.

#How to fix it

Put the operator at the end of the line above (close + then open on the next line), or wrap the whole expression in parentheses. See Operators.

#Example

ChartScriptError: CS1055
//@chartscript 1
indicator("Sum")
const total = close
    + open
plot(total)

Fixed

ChartScriptOpen in editor
//@chartscript 1
indicator("Sum")
const total = close +
    open
plot(total)
  • CS1057 — Expected ; or a new line before found.
  • CS1032 — Expected an expression.

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