Why a backtest and a demo mislead you

A smooth line on a backtest or a demo account can hide the exact problem you just learned about. Here is how.
What a backtest usually assumes
Most backtesting software fills every trade at the exact price shown on the chart, with no spread, no commission, and no slippage unless it is specifically modeled in.
That produces a curve that looks smoother and more profitable than anything a live account will show, even when the entry and exit logic is identical.
- A fixed or zero spread, instead of one that widens during news and thin hours
- No commission line, unless it is added in by hand
- No slippage, so every stop and target fills at the exact price requested
- No swap, so holding a trade overnight appears to cost nothing
What a demo account usually hides
A demo account often connects to a different, faster execution path than a live account on the same broker, because nothing real is at risk on the other side of the trade.
Fills can be cleaner, and slippage during news can be smaller or absent, which flatters a strategy that has never had to survive real conditions.
Live results, measured net of realistic costs, are the number that matters. A smoothed backtest line or an easy demo run is not.
Trading carries risk and you can lose money.
How to test in a way that will not lie to you
Before trusting any backtest or demo result, add an estimate of spread, commission, slippage and swap into the test, even if the software's default is zero.
If a strategy's edge cannot survive a deliberately pessimistic set of costs, it is unlikely to survive contact with a live account either.

A demo account that never loses money to slippage is not proof of a good strategy. It is proof of a demo account. The bill for confusing the two only ever arrives on the live account.
The picture to keep
A backtest without real costs is like rehearsing a play with no audience and no costume changes. A smooth rehearsal does not guarantee a smooth opening night.