A demo account is an account funded with imaginary money that trades against the broker's real price feed. Every broker offers one, it is free, and it is the right place to learn a platform, to try a strategy and to run an EA for the first time. It is also the source of a great deal of false confidence, because it differs from a live account in several ways that all favour the demo.
Where demo and live differ
Execution. Demo orders are filled at the quoted price, instantly, every time. Live orders in a fast market are filled at the next available price, and pending orders can be missed. Demo shows no slippage; live does.
Spread. Some brokers run their demo servers with the same spreads as live, others with narrower or fixed spreads. A demo that never shows a spread widening at news is not showing you live conditions.
Swap and commission. Usually applied on demo, but not always, and not always at the live rate.
Behaviour. Nobody feels a demo loss. The decisions a trader makes with real money are different, and a strategy that was easy to follow on demo is often abandoned in the first live drawdown. This does not apply to an EA, which is one of the better arguments for using one.
What a demo is for
Learning the platform without cost. Checking that an EA installs, runs, places stops and behaves as described. Watching a strategy through a few weeks of real market conditions before risking money. Forward testing, which is running a strategy on live prices going forward rather than on historical data, and which is far more informative than a backtest because it cannot be fitted to the past.
What a demo is not for
Proving that a strategy is profitable. A demo result is a live result with the costs and frictions removed, and the difference between the two is where marginal strategies die. A strategy that is only just profitable on demo will usually lose live. A strategy that is clearly profitable on demo over a long period, at a broker whose demo mirrors its live conditions, is a candidate for a small live account, not a proven system.
An EA is run on a demo account for three months and makes a return of five per cent from 90 trades averaging six pips each. The demo had a fixed one-pip spread and no slippage. The live account at the same broker has an average spread of 1.4 pips at the times the EA trades and an average of 0.3 pips of slippage on entries. That is 0.7 pips more cost per trade, on trades averaging six pips, about twelve per cent of the gross. The five per cent becomes something under four, before any difference in fills on the stops. Still positive, in this case, but the demo overstated it.
A demo forward test is the right first step with any EA, and a public, verified demo record is far better evidence than a backtest, because it was produced on real prices after the strategy was written. When judging such a record, ask whether the demo server's spreads and swaps match the broker's live server, and expect live results to be somewhat worse.
When testing an EA yourself, open the demo at the broker you will use live, on the same account type, and leave the EA at its default settings. Watch the Experts log for errors, check that every position carries a stop, and give it long enough to show a losing period as well as a winning one. A demo that has only been run through a good month has told you nothing about the bad ones.