A small language
Lipi keeps its surface small. A statement is one line. A block is written with braces over several lines. A script declares what it is with one call,indicator(...) or strategy(...), and the platform evaluates it once for every bar. What the script produces
(plots, drawings, tables, alerts, strategy orders) goes through a fixed set of calls, listed in the reference.
How the language is defined
Lipi is defined by an ANTLR grammar and implemented in Go, in GoCharting’s own codebase. The grammar decides what parses. The compiler decides which parsed scripts are accepted, and the interpreter decides what they do when they run. All three are maintained together with the platform, so a name in the language is a name in GoCharting’s compiler.Versions
Lipi has two versions. The first line of a script selects one://@lipi=2 selects Lipi v2, and a script without the line is read as
Lipi v1. Lipi v2 adds arrays, drawings, tables and strategies, and the editor checks a script against the rules of the version it
selects. This manual describes Lipi v2; see Moving a script from Lipi v1 to v2 for
what changes.