Skip to main content
Some names and forms look as though they ought to work, and do not. Each row gives what is written, what the compiler says, and what to write instead. All of them are refused by the editor’s check, except where the row says otherwise.

Names that do not exist

Habits that have a Lipi spelling (array.size, timeframe.*, chart.point, plot.style_*, color.pink, str.format, ^, ;, x = if ..., a function that sets a global, a field read off a call) are in Names and conventions, which holds the full table of them.
The compiler says: var is not a valid type in variable declaration. Write static int count = 0.
The compiler says: No variable with name request found. There is no way to read another symbol or interval.

Punctuation and operators

Forms the compiler refuses

Things that look wrong but work

  • ta.sma(...) and talib.sma(...) are the same namespace.
  • and, or, not and &&, ||, ! are the same operators.
  • step may be a named argument: input.int(20, "Length", step=5).
  • A function may be declared with func or with no keyword: half(float a) => a / 2. (def declares a method; see Your own functions.)
  • x == na compiles but warns; write na(x).