In development · Glot Studio for the web comes first

Glot language: one trading language for Pine Script and MQL

Glot is a trading programming language by TradeGlot for indicators, strategies and expert advisors. It runs bar by bar like Pine Script and event by event like MQL, and code written in Pine Script v4–v6, MQL4 or MQL5 can be converted to it.

Four program kinds

A Glot file declares one of four kinds: indicator (runs every bar, no orders), strategy (runs every bar and may place orders), expert (runs on events such as ticks and timers, like an MQL Expert Advisor) and library (shared code, like a Pine library or an MQL include file).

Designed to prevent common trading-code mistakes

The Glot compiler rejects errors that other trading languages only reveal in a live account.

  • Units in the type system: prices, price distances, percentages, money and volume are different types, so adding a price to a pip count is a compile error.
  • Fixed-point decimals for order prices and profit and loss, rounded to each instrument's tick size.
  • No look-ahead in strategies: higher-timeframe data returns closed bars only.
  • Every compiler error has a code, such as GLT-E0801, and a suggested fix.

Tested and reproducible

Glot treats a trading program like any other software that must be tested.

  • test blocks live next to the strategy and run with glot test.
  • Every paper or live run can be replayed bar by bar, and each order stores the reason and the variables behind it.
  • Backtests split data 70/30 into in-sample and out-of-sample by default, with walk-forward, Monte Carlo and a repaint detector.
  • A portability score from 0 to 100 shows whether a strategy runs the same on every broker.

From Pine Script and MQL to Glot

Converters translate Pine Script v4, v5 and v6, MQL4 and MQL5 into readable Glot source with a conversion report that lists what changed, what needs review and the portability score.

Status

The Glot language specification is at version 0.2 (draft). Glot 1.0 is planned to ship with Glot Studio 1.0 on the web. The specification will be published under CC BY 4.0. The compiler and engine are in development; nothing here is available to download yet.

Example in Glot 0.2 (draft syntax)
glot 0.2
strategy "Pullback H4" (overlay = true, fill = pine)

let ema20 = ta.ema(close, 20)
let h4    = data.series(symbol, H4, lookahead = off)
let h4ema = ta.ema(h4.close, 50)

if close crosses_over ema20 and close > h4ema {
    trade.buy(size = equity_pct(10%),
              sl = dist.points(300), tp = dist.points(600),
              reason = "pullback_h4")
}

Status as of December 2026

Frequently asked questions

Is the Glot language related to glot.io?

No. The Glot language is a trading programming language made by TradeGlot. glot.io is an unrelated website for running code snippets.

Is Glot a replacement for Pine Script and MQL?

Glot is designed to hold both: it runs bar by bar like Pine Script and event by event like MQL. Existing Pine Script and MQL code can be converted to Glot, so you do not have to rewrite it by hand.

Are Glot keywords in English only?

Yes. Glot has 37 English keywords so that sample code and the community do not split by language. Error messages, editor hints and documentation are available in other languages.

Is the Glot language free to use?

The development tools, including Glot Studio, are planned to be free. Live trading through brokers and cloud services come later and may have paid plans.