All guides · Trading bots

MT4 vs MT5 for Trading Bots

The practical differences between MetaTrader 4 and MetaTrader 5 for running Expert Advisors, and how to choose.

What it is

MetaTrader 4 (2005) and MetaTrader 5 (2010) are separate apps. Bots are written in different languages, MQL4 and MQL5, so an MT4 bot won't run in MT5 or the other way round. MT5 has more timeframes, a faster multi-threaded Strategy Tester that can use real tick data, and supports both netting and hedging accounts.

Why it matters

You need a bot built for the platform your broker gives you. MetaQuotes stopped selling new MT4 licences to brokers in 2018, so more and more brokers lead with MT5, but many forex accounts still run MT4.

Good to know

Use whichever platform your broker account runs. If you can choose, MT5 is the better place to test bots thanks to its Strategy Tester. PositionAlpha builds either: pick MT4 or MT5 when you create a bot.

Example

Your broker offers both: open an MT5 demo, backtest your bot with real ticks, and run the MT5 version. If your live account is MT4-only, build the MT4 version of the same strategy.

Common mistakes

Downloading the MT5 file for an MT4 account (or the reverse), and assuming a bot will behave the same on a netting account as on a hedging account.

Related