> ## Documentation Index
> Fetch the complete documentation index at: https://gocharting.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Lipi language map

> A factual map from MQL4, MQL5, NinjaScript, Pine Script and thinkScript to Lipi: 205 concepts, each with the Lipi construct, the matching construct in every language and the differences to handle when converting.

The language map lists 205 concepts a chart script uses and, for each, the Lipi construct and the matching construct in MQL4, MQL5, NinjaScript, Pine Script and thinkScript. Use it to move a script to Lipi: it shows what carries over, what behaves differently and what Lipi does not have.

The map gives similar expressions, not equivalents. Two constructs with the same name can still differ in arguments, defaults, warm-up or bar timing, so every difference a conversion has to handle is stated in its row. Lipi comes first because the map is written for converting into Lipi; the other languages follow in alphabetical order. The map does not claim the reverse direction.

Lipi's indicator functions can be written `ta.` or `talib.`: the two prefixes name the same functions. The map uses `ta.`.

## How Lipi differs

These differences apply to whole scripts, whatever language they come from.

* A script reads at most 500 bars back: `close[500]` works, `close[501]` stops the script when it runs. [More](https://gocharting.com/docs/scripting/reference/language-map/history-and-state.md#history-lookback-limit).
* A built-in history function keeps its own history per call and moves it only on bars where that call runs. Call it on every bar, outside `if` and `?:`, and use the result inside. [More](https://gocharting.com/docs/scripting/reference/language-map/history-and-state.md#history-call-every-bar).
* An indicator reruns on every tick of the forming bar by default. `static` keeps a value from bar to bar; `intra` keeps it across the reruns of one forming bar. [More](https://gocharting.com/docs/scripting/reference/language-map/execution-and-types.md#exec-every-tick).
* A script reads only the chart's own symbol and timeframe. There is no call for another symbol or timeframe. [More](https://gocharting.com/docs/scripting/reference/language-map/market-data-and-time.md#data-other-symbol).
* A colour's alpha is an opacity from 0 (invisible) to 1 (solid), not a transparency from 0 to 100. [More](https://gocharting.com/docs/scripting/reference/language-map/plots-and-drawings.md#color-transparency).
* Dividing two integers gives a float: `7 / 2` is 3.5. [More](https://gocharting.com/docs/scripting/reference/language-map/control-flow-and-functions.md#op-arithmetic).

## Where to start

* [Execution and types](https://gocharting.com/docs/scripting/reference/language-map/execution-and-types.md): How a script runs and the kinds of values it works with.
* [History and state](https://gocharting.com/docs/scripting/reference/language-map/history-and-state.md): Reading earlier bars and keeping values from one bar to the next.
* [Control flow, functions and collections](https://gocharting.com/docs/scripting/reference/language-map/control-flow-and-functions.md): Branches, loops, your own functions and types, operators and arrays.
* [Inputs](https://gocharting.com/docs/scripting/reference/language-map/inputs.md): Settings the chart user can change.
* [Plots and drawings](https://gocharting.com/docs/scripting/reference/language-map/plots-and-drawings.md): Putting values, shapes, colours, objects and tables on the chart.
* [Strategies and alerts](https://gocharting.com/docs/scripting/reference/language-map/strategies-and-alerts.md): Simulated orders, positions and results, and notifications.
* [Market data and time](https://gocharting.com/docs/scripting/reference/language-map/market-data-and-time.md): Prices, volume, orderflow, the instrument, the timeframe, sessions and time.
* [Math and strings](https://gocharting.com/docs/scripting/reference/language-map/math-and-strings.md): Numeric and text functions.
* [Arrays](https://gocharting.com/docs/scripting/reference/language-map/arrays.md): Creating and working with arrays.
* [Technical indicators](https://gocharting.com/docs/scripting/reference/language-map/indicators/moving-averages.md): Built-in indicator and series functions. One page per family, starting with moving averages.
* [Not in Lipi](https://gocharting.com/docs/scripting/reference/language-map/not-in-lipi.md): The concepts Lipi has no construct for, and what to use instead.
* [Convert a script](https://gocharting.com/docs/scripting/reference/language-map/convert-a-script.md): The order of work for a conversion, and the corrections most often needed.

## Relations

Each cell of a summary table holds one of these words. A section repeats it in full with a note.

| Word | Meaning |
| - | - |
| Exact | The construct does the same job with the same arguments that matter. No note. |
| Caveat | Same job, with one difference a conversion must handle, named in the note. |
| Differs | Looks like the Lipi construct but behaves differently. Convert by behaviour, not by name. |
| Composite | Needs several Lipi constructs together. |
| Not in Lipi | The language has it and Lipi has no construct for it. See [Not in Lipi](https://gocharting.com/docs/scripting/reference/language-map/not-in-lipi.md). |
| Absent | The language has no such construct. |
| Unresolved | The documentation does not settle it. The row makes no claim. |

## Versions and sources

Every row was checked against the language's own documentation, on 2026-11-01. The columns are checked against documentation, not reviewed by an expert in each language. The Lipi side was checked against reference 2.7, compiler build df7b3b14. This release: 2026-11-01, 776 constructs, 239 confirmed absences, 10 unresolved.

| Language | Documentation checked |
| - | - |
| Lipi | Reference 2.7, compiler build df7b3b14 |
| [MQL4](https://docs.mql4.com/) | MQL4 Reference, docs.mql4.com (no build number stated) |
| [MQL5](https://www.mql5.com/en/docs) | MQL5 Reference, [www.mql5.com](http://www.mql5.com) (no build number stated) |
| [NinjaScript](https://ninjatrader.com/support/helpGuides/nt8/) | NinjaTrader 8 Help Guide, release 8.1.8 |
| [Pine Script](https://www.tradingview.com/pine-script-reference/v6/) | Pine Script v6 reference and user manual |
| [thinkScript](https://toslc.thinkorswim.com/center/reference/thinkScript) | thinkScript Reference, thinkorswim Learning Center 3.11.0 |

## Machine-readable map

The whole map is one JSON file, [language-map.json](https://gocharting.com/docs/scripting/reference/language-map/language-map.json), described by [language-map.schema.json](https://gocharting.com/docs/scripting/reference/language-map/language-map.schema.json). It has the same rows as these pages, plus each construct's signature and the passage of the documentation it was checked against. Tools and AI assistants can read it directly.

## Report a mistake

If a row is wrong or out of date, [report the page](https://gocharting.com/docs/scripting/ai/docs-for-ai-tools.md#report-a-page-that-is-wrong) and name the row.

## Names of other languages

The names of the other languages belong to their owners (Charles Schwab & Co., Inc.; MetaQuotes Ltd.; NinjaTrader, LLC; TradingView, Inc.). They are used here only to identify the languages. GoCharting is not affiliated with them.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.