Ready to go further
Next: size the trade for either platform
Lot sizes work the same way on both. Enter the balance, risk and stop to see the lot an EA should use.
What is included
- What it is, in plain words
- The formula or mechanism, with exact arithmetic
- How it hits grid, martingale and DCA bots
- A check you can run before you switch a bot on
Who it is for
- People who run or plan to run a trading bot
- Anyone reading a backtest or a bot sales page
- Readers who want the numbers, not the pitch
- Not advice, and not a signal service
Key facts
- MetaTrader 4 (MT4) and MetaTrader 5 (MT5) are separate platforms from the same maker. MT5 is not an update of MT4, and a program written for one does not run on the other.
- EAs for MT4 are written in MQL4 and EAs for MT5 in MQL5. Moving an EA means rewriting it, and the rewrite can change how it behaves.
- MT5 can keep positions in netting mode, where opposite orders merge into one position, or in hedging mode. In the made-up example below, a buy of 1.0 and a sell of 0.4 leave 0.6 lots long under netting and two open positions under hedging (calculated by us on 28 Oct 2026, exact).
- The strategy tester differs between them, so the same EA can show different backtest results. A better tester does not make a strategy better.
- What a platform offers also depends on the broker. Check the account type, the symbols, the hedging rule and the costs with your own broker before choosing.
Two platforms, not two versions
MetaTrader 5 came after MetaTrader 4, and many people assume it replaced it. It did not. Many brokers still offer both, and many EAs exist for only one. The two platforms have different programming languages, different order handling and different testers. For a person who runs bots, the choice is mostly decided by which platform the EA was written for and which one the broker supports.
What differs for a bot
| Feature | MetaTrader 4 | MetaTrader 5 | What it means for a bot |
|---|---|---|---|
| Language | MQL4 | MQL5 | An EA cannot be moved across without rewriting it. |
| Chart timeframes | 9 | 21 | More periods give a bot more choice, and more ways to overfit. |
| Pending order types | 4 | 6 | MT5 adds stop-limit orders. An EA that uses them cannot run on MT4. |
| Position handling | Hedging style | Netting or hedging, set by the account | A grid or recovery EA that holds opposite positions may break on netting. |
| Strategy tester | One symbol at a time | Can use several cores and test several symbols | Results can differ between the two even for the same idea. |
| Instruments | Mostly forex and CFDs | Also exchange traded products, where the broker offers them | Depends on the broker. |
These are the standard features as commonly documented. Brokers set what their server offers, and platforms get updates, so treat the table as a checklist to confirm and not as a promise.
Netting and hedging, with numbers
This is the difference that breaks the most EAs. On a hedging account each order is its own position. On a netting account orders on the same instrument merge into one position. Take a made-up pair of orders: a buy of 1.0 lot then a sell of 0.4 lot. Under hedging you hold two positions, 1.0 long and 0.4 short, and the net exposure is 0.6 lots. Under netting you hold one position of 0.6 lots long. The exposure is the same, but the positions are not.
Why it matters for each kind of bot
- Grid and recovery bots. These often hold buys and sells at once. On netting they cancel each other, so the logic that tracks each grid line may not work. See zone recovery and grid trading.
- Single-position bots. A bot that holds one trade at a time works on either.
- Bots tuned to a backtest. A different tester and different data can move the result. A bot that only works in one tester is a warning of overfitting.
- Costs. The platform does not set the spread or the commission. The broker does. A comparison of two platforms at one broker says nothing about another broker. See spread.
What a switch can change besides the code
Moving an EA to the other platform is a new test, not a copy. The rewritten code may round lot sizes differently, read prices at a different moment of the candle, or handle a rejected order in another way. Each of these can move the result by a small amount per trade, and a small amount per trade is exactly what a thin strategy depends on. Treat the moved EA as a new bot: new backtest, new demo run, new small live trial.
How to choose, in order
- Start from the EA or strategy: which platform it was written for, and whether the code is available for review.
- Check what your broker offers: which platform, which account type, hedging or netting, and the costs.
- Run the EA on a demo account on that exact account type and watch whether it behaves as designed.
- Then test with real fills at a small size, as in forward testing.
What this page does not tell you
It does not say that one platform makes more money than the other, because neither does. It does not cover every feature, and platforms and brokers change. It is general education about the differences that matter most for bots.
Keep Going
Related Tools and Guides
Keep exploring
FAQ
Frequently Asked Questions
Is MetaTrader 5 an update of MetaTrader 4?
No. It is a separate platform with a different language and different order handling. Many brokers offer both, and an EA written for one does not run on the other.
Can I run my MT4 EA on MT5?
Not directly. MT4 uses MQL4 and MT5 uses MQL5, so the EA must be rewritten. The rewrite can change how it behaves, so test it again from the start.
What is the difference between netting and hedging?
On a hedging account each order is its own position. On a netting account orders on the same instrument merge into one position, so a buy and a sell offset each other.
Which platform is better for trading bots?
Neither is better for every bot. The choice usually follows the EA you want to run and what your broker offers. Check the account type and test on a demo first.
Will the same EA give the same backtest on both?
Not necessarily. The testers build prices and fill orders in different ways, so results can differ for the same idea.
Are the numbers on this page real?
Example numbers are made up to show how the maths works, and the page says so. A figure only counts as exact when the page says it was calculated on a stated date. Nothing you enter in a calculator leaves your browser.
Can I use this to decide whether to run a bot?
It can show whether a bot's numbers hold together and how much an account can lose. It cannot say what the market will do, and it is not advice. Use it to ask better questions, then read the terms of your own broker or exchange.
Is this financial advice?
No. It is general education about platform differences. Features and broker rules change, so confirm them with your own broker.
Know the Risk Before You Run It
Free calculators and guides, added every week. Leave your details and we will email you when new ones go up.
Trading carries a risk of loss