Solutions Discover eTrader Launch your Broker Launch your Prop Firm Company Home Blog Where We Work Legal Center Contact
Platforms & White-Label

Tide vs MQL5: Writing Trading Robots in 2026.

Tide and MQL5 take opposite approaches to building a trading robot: one is a narrow, sandboxed language built only for trading, the other a mature general-purpose language with a huge library behind it.

By September 19, 2026 9 min read

A trading robot written in MQL5 can misplace a lot size where a price belongs and the compiler will not stop it, because both are just numeric types under the hood. A robot written in Tide, eTrader's own language, cannot make that mistake: price and lots are separate types, and passing one where the other belongs fails to compile. That single design choice says a lot about what each language is for and who it is built for.

This is a comparison for anyone deciding where to build a trading robot in 2026: MetaQuotes' established MQL5, running inside MetaTrader 5, or Tide, the language behind eTrader Code. Both let a trader automate entries, exits and risk rules. They differ in how strict the language is, how a robot is put together, where it runs once it is live, and how big a library of ready-made code already exists.

Type safety: general-purpose types versus price and lots as distinct types

MQL5 is a C-like language. It has the numeric types you would expect from any general-purpose language: int, double, long, and so on. A price, a lot size, a pip count and a ticket number can all end up stored as a double, and the compiler has no concept that one of those numbers means something different from another. Getting the order of arguments wrong in a trade function is a runtime bug, not a compile error.

Tide takes a narrower, stricter approach because it was built only for trading. Its type system includes price and lots as distinct types, alongside int, num, bool, text, time, duration, series<T>, array<T>, map, struct and enum. A function expecting a lots value rejects a price value at compile time. Series, meaning one value per candle, lift over arithmetic automatically, so a robot can compute across a full price history without writing an explicit loop. Tide's own description of the idea is direct: an indicator is an expression and an order is one call with named arguments.

How a robot is structured

An MQL5 Expert Advisor is built around functions the terminal calls at defined moments: OnInit() when the robot loads, OnTick() on every price update, OnDeinit() when it is removed. Trading itself typically goes through the CTrade class, which wraps the lower-level OrderSend() calls with position and order management methods. This is a mature, class-based API, and MQL5's full object-oriented feature set, classes, inheritance, polymorphism and templates, gives a developer a lot of room to build reusable trading libraries around it.

A Tide robot is built around event handlers too, but they are trading-specific from the start: onInit, onBar, onTick, onFilled, onClosed, onTimer, onWebhook. Trades are placed with a single call using named arguments, for example trade.buy(volume, sl: stop, tp: target, comment: "text"), which returns a result with ok, ticket and message fields the robot can check immediately. Control flow adds trading-specific keywords on top of the usual if, match, for and while: guard exits a block early, once runs code only on the first tick, and every(duration) throttles a block to run no more often than a set interval. Indicators are declared with plot and compile separately from robots, into .eti files rather than the .etb files a robot compiles to.

AspectTideMQL5
Type systemStrict, trading-specific: price and lots are distinct typesGeneral C-like numeric types; no built-in distinction between a price and a lot size
StructureTrading-specific event handlers: onBar, onTick, onFilled, onWebhook and moreGeneral lifecycle functions: OnInit(), OnTick(), OnDeinit(), plus the CTrade class
Placing a tradeOne call with named arguments, returns ok, ticket, messageCTrade methods or direct OrderSend() calls
Where it runseTrader's cloud, no VPSThe MetaTrader terminal, historically kept running on a desktop or a rented VPS
BacktestingDeterministic replay of the firm's own price history in the cloudMulti-threaded Strategy Tester, tests across many parameter sets at once
Third-party librarySmall, growing, eTrader is newerLarge and long established, the MQL5 Market and community

Backtesting: deterministic cloud replay versus a multi-threaded tester

MetaTrader 5's Strategy Tester is a mature, multi-threaded backtesting and optimization engine. It can run large batches of parameter combinations in parallel across available CPU cores, which is genuinely useful when a developer wants to sweep a wide range of settings and see which combination performed best on historical data. This is one of MQL5's strongest points and one reason experienced MetaTrader developers stay with it.

Tide's backtester works differently: it replays historical candles from eTrader's own price history deterministically, meaning the same bytecode, the same inputs and the same candles always produce the same trades, with an equity curve and every simulated trade shown. It does not offer the same parallel parameter-sweep workflow as the Strategy Tester. What it does offer is a shorter loop from writing code to seeing results, since the editor flags mistakes as they are typed and the backtest runs against the same price history the live robot will later trade on, in the same cloud environment, with no separate terminal or data file to manage.

Where the robot actually runs

This is one of the more practical differences for a firm or a trader to weigh. An MQL4 or MQL5 Expert Advisor needs the MetaTrader terminal open and connected to keep working, which historically meant leaving a desktop running or renting a VPS to host the terminal around the clock. A Tide robot compiles to an .etb bundle that runs inside eTrader's own cloud once it is deployed, so there is no terminal to keep open and no separate VPS to rent or maintain. The trade-off is sandboxing: a Tide bundle declares its capabilities up front, including any network host it needs to call, and runs inside limits such as a step budget per event and a fixed memory cap, so it cannot reach an undeclared address or see another bot's state. Read more on this specific trade-off in cloud robots versus a MetaTrader VPS.

Ecosystem size: an honest comparison

This is where MQL5 has a real and current advantage that eTrader does not match yet. MetaTrader 4 launched in 2005 and MetaTrader 5 in 2010, and in that time the MQL5 Market and the wider MQL5.community have built up a large library of ready-made robots, indicators and scripts, along with years of forum threads, tutorials and freelance developers who already know the language. A trader who wants to buy or adapt an existing strategy has far more to choose from on MQL5 than on Tide today.

Tide's third-party library is small by comparison, because eTrader itself is a newer platform. What it ships with out of the box is a reasonable base: 45 built-in indicators including SMA, EMA, RSI, MACD, Stochastic, CCI, ADX, ATR, Bollinger Bands, OBV, Ichimoku, Alligator, Standard Deviation and Money Flow Index, plus reusable .tidelib library files a team can share internally with exported pub functions. But a trader coming from MQL5 with a large personal or purchased library of robots should expect to rewrite them by hand in Tide. There is no automatic converter from MQL4 or MQL5 to Tide, and none is planned; every robot that moves from one language to the other is rewritten, not converted. See migrating MQL5 robots to Tide for what that rewrite actually involves.

Which one fits which developer

A developer who already knows MQL5, has a library of Expert Advisors built up over years and wants access to the largest pool of third-party code and freelance help will get more out of staying with MQL5. A developer or trader who wants a smaller, stricter language purpose-built for trading, with sandboxed cloud execution and no VPS to maintain, and who is willing to accept a smaller starting library in exchange, is better served by Tide. Firms weighing both platforms for their traders can read a fuller platform comparison in MetaTrader alternatives.

"Tide is deliberately narrower than MQL5. We traded away general-purpose flexibility for a type system that cannot mix up a price and a lot size, and a robot that never needs a VPS."

— The SGHK Team

Key Takeaways

Frequently Asked Questions

Is Tide harder or easier to learn than MQL5?

Tide is narrower in scope, which tends to make it easier to pick up for someone whose only goal is writing trading robots. It has fewer general-purpose features than MQL5, no class hierarchies to design, and the trade-specific event handlers and named-argument trade calls map closely to the trading logic itself. A developer with a general programming background may still prefer MQL5's broader C-like feature set.

Can an MQL5 Expert Advisor be converted automatically into Tide?

No. There is no automatic converter from MQL4 or MQL5 to Tide. A robot that needs to run on eTrader has to be rewritten by hand in Tide, using the same trading logic but Tide's own event handlers, types and trade calls.

Does a Tide robot need a VPS the way an MQL5 Expert Advisor historically did?

No. A compiled Tide robot runs inside eTrader's own cloud once it is deployed, so there is nothing for the trader to keep running. An MQL5 Expert Advisor needs the MetaTrader terminal connected, which is why many MQL5 users rent a VPS to keep it running around the clock.

Which language has the larger library of ready-made robots?

MQL5, by a wide margin. MetaTrader has been around since 2005 (MT4) and 2010 (MT5), and the MQL5 Market and community have built up a large library over that time. Tide is newer, so its third-party library of robots and indicators is smaller today.

Does Tide support backtesting across many parameter combinations at once, like the MQL5 Strategy Tester?

Tide's backtester replays historical candles deterministically and shows an equity curve and every trade, but it does not offer the same multi-threaded parameter-sweep workflow as MetaTrader 5's Strategy Tester. Developers who rely heavily on large-scale parameter optimization will find that workflow more built out in MQL5 today.


About SGHK

SGHK is a FinTech company that designs and builds its own software for the trading industry: the eTrader trading platform, Launch your Broker and Launch your Prop Firm. Every product is written, hosted and supported in-house and licensed to trading firms, with the CRMs branded to them, all hosted by us in the cloud, managed by each firm and built to scale across clustered servers as our clients grow. Everything is encrypted, and each firm is the only one with access to its data and its clients' data.

Your Own Trading Firm, Live in 24 Hours.

SGHK builds the technology behind brokers and prop firms: trading platform, CRM, client portal and payment rails, one bundle, one vendor. Book a call and see it working, or keep reading the guides.

More in Platforms & White-Label