Lines and comments

One statement per line; indent to carry on.

For AI tools: this page as Markdown · the whole language in one file

  • One statement per line.
  • A line that starts at the left edge starts a new statement; an indented line carries on the one above.
  • Inside brackets a statement can run over as many lines as it likes.
  • // starts a comment, to the end of the line.
1trend = if close > ema(close, 50)2        then 13        else -1   // indented: the same statement4plot(trend, "Trend", style = steps)

See also: Names and formulas, The version line