Your EA Works on Demo but Not Live: What Actually Changed

The EA is the same file. What changed is everything around it: the spread you pay, how orders are filled, how close a stop is allowed to sit, and what the account is charged overnight. Each of those is a number you can read in MetaTrader and compare side by side, and together they explain almost every case of a strategy that looked good on demo and disappoints live.

Last updated 18 September 2026

The code did not change

The same .ex4 or .ex5 file runs on both accounts. So when results differ, the cause is in the eight things below, and every one of them is readable in MetaTrader before you risk anything.

Open the Symbols window on each account: right click in Market Watch, choose Symbols, pick the pair, and read the specification. Put the two lists side by side. Most of this article is that comparison.

1. Spread, and what it costs your strategy

Demo spreads are often fixed and flattering. Live spreads move with the session, widen at the daily rollover and go wide around news.

What matters is not the spread by itself but the spread relative to the target. A strategy aiming for 30 pips gives up about 3 per cent of it to an extra pip. A strategy aiming for 5 pips gives up 20 per cent. That single ratio explains why some EAs survive the move to live and others never do.

Measure it rather than guess: watch the pair in Market Watch for a full day, including the rollover hour, and note the worst spread you see.

2. Commission, which the backtest probably ignored

Raw or ECN accounts show a tight spread and charge a commission per lot instead. Many backtests and most demo accounts charge none.

Convert it into pips so it is comparable: a round turn commission of $7 per lot on EURUSD is roughly 0.7 pips. Add that to the spread before judging whether a strategy still works.

3. Stop level: the reason orders get rejected

Every broker sets a minimum distance between the current price and any stop loss or take profit. It is shown in the symbol specification as Stops level.

Demo servers frequently set this to zero. A live account might require 10 or 20 points. An EA placing a take profit inside that distance gets invalid stops back from the server, and the trade never opens.

This one is easy to miss because the EA looks like it is doing nothing at all. The Journal tab names it.

4. Execution: how your order is actually filled

A demo fills at the price you asked for. There is no counterparty and nothing to run out of.

Live is different in three ways. Slippage means your market order fills at a slightly worse price when the market moves between request and fill. Requotes, on instant execution accounts, mean the broker offers you a new price instead of filling. And in fast markets the delay itself grows.

Pending orders are less affected: a limit order sitting at the broker fills at its price or not at all. Strategies built on pending entries therefore transfer to live more faithfully than ones that chase with market orders.

5. Swap, charged every night you hold

Swap is the interest paid or earned for holding a position overnight, and it is tripled on the day the broker rolls three days at once, usually Wednesday.

Demo accounts often have swap set to zero. A grid or basket strategy that holds positions for days can lose a meaningful part of its profit to swap on a live account, and nothing in the backtest warned about it.

The number is in the symbol specification, per lot, long and short.

6. Leverage and free margin

A demo opened at 1:500 and a live account at 1:30 are not the same test. The EU and UK cap retail leverage at 1:30 on major pairs, and that changes how much margin each position takes and how many the account can hold at once.

For any strategy that adds positions, this is decisive: the same sequence that survived on demo can run out of margin on live and stop halfway through, which is the worst possible moment to stop.

7. The account type is not the same

Check whether both accounts are hedging or one of them is netting. It is written in the Trade tab beside the balance.

On netting, MetaTrader merges every position on a symbol into one, so a grid or a hedge cannot exist. An EA designed around that behaves completely differently, or not at all. We explain the mechanics in Hedging vs Netting Accounts in MT5.

8. Symbol names, lot steps and sessions

Live symbols often carry a suffix: EURUSD.m, EURUSD.raw. Minimum lot may be 0.01 on one account and 0.1 on another. Trading sessions and holidays differ between server groups.

Any of these can make an EA sit silent on a live chart while it works perfectly on demo. If nothing is opening at all, work through MT5 EA not opening trades first.

How to compare the two properly

  1. Open a demo with the same broker and server type you will trade live.
  2. Put both symbol specifications side by side: spread, stops level, minimum lot, lot step, swap, contract size.
  3. Add commission to the spread, in pips.
  4. Re-run your backtest with that combined cost, not with the default.
  5. Then run live at the smallest size the account allows for a few weeks, and compare the average fill price against what the EA asked for.

The point of the small live run is not profit. It is to measure slippage and spread on your own account, which no demo can tell you.

What honest expectations look like

A strategy that made a lot on demo and loses a little live was usually never profitable by much: costs were eating most of the edge and the demo hid them. A strategy that makes somewhat less live, with the same shape of equity curve, has survived the move, which is the normal and acceptable outcome.

If you are sizing a live account for the first time, our lot size calculator works out a starting lot from the balance rather than from optimism.

Common questions

Are demo accounts rigged to make EAs look good?

Usually not deliberately. A demo fills your order at the price you asked for, because there is no real counterparty and no real liquidity behind it. Live fills come from the market, so they can be worse, and a strategy that takes small profits per trade feels that difference far more than one that holds for days.

Why does the same EA open trades on demo but refuse on live?

Most often the two accounts are not the same product. Different symbol names or suffixes, a different minimum lot, a different stop level, less free margin, or a demo that is hedging while the live account is netting. Open the Symbols window on both and compare the specification line by line.

What is a stop level and why does it reject my orders?

It is the minimum distance a broker allows between the current price and a stop loss or take profit. If an EA places a take profit closer than that, the order is rejected with "invalid stops". Demo servers often set it to zero while the live account does not, which is why the same settings can work on one and fail on the other.

How much difference does spread really make?

It depends entirely on the size of the target. A strategy taking 30 pips per trade loses roughly 3 per cent of that target to a 1 pip wider spread. One taking 5 pips loses 20 per cent. This is why scalping strategies collapse on a standard account and hold up on a raw one, and why a backtest run at a fixed 1 pip spread can be honest and still useless.

Should I test on a demo of the same broker I will trade with?

Yes, and on the same account type. A demo from the broker and server you intend to use shares the symbol names, the stop level, the lot steps and the sessions. A generic demo from another broker tests something you are not going to trade.