Backtest vs Forward Test: What Each Proves About an EA
Short answer: a backtest runs an Expert Advisor on historical data to show how its rules would have performed; a forward test runs it on live prices — usually a demo account — to show how it performs now, with real spreads and fills. A backtest can be fooled by fitting the rules to the past; a forward test cannot, but it is slow. You need both, in that order.
What a backtest proves — and what it doesn't
A backtest answers: did these exact rules make money on this data, with these costs? It is fast, covers years in minutes, and lets you compare ideas.
It does not prove:
- That the rules were not tuned to that data. Adjust parameters until a backtest looks good and you have described the past, not found an edge.
- That the costs were realistic. Fixed spreads and zero commission flatter every short-term strategy.
- That your fills will match. The tester's fill model is not your broker's execution at 3 a.m. on a Monday.
What a forward test proves — and what it doesn't
A forward test answers: do the rules still work on prices that did not exist when I built them, with live spreads and live execution? Because the data is new, it cannot be curve-fitted.
It does not prove much quickly. Twenty trades is not a sample. A forward test on a strategy that trades twice a week needs months to say anything — which is why it comes second, after a backtest has filtered out ideas not worth that time.
A middle step: the out-of-sample backtest
Before a forward test, hold back part of the history. Build and tune on one period, then run the EA once — without changing anything — on a later period you never looked at. MT5's Strategy Tester can do this automatically with its Forward setting, which reserves the last part of the date range (a half, a third, a quarter, or from a date you choose) as an out-of-sample test.
| Test | Data | Can be curve-fitted? | Speed | Proves |
|---|---|---|---|---|
| In-sample backtest | History you tuned on | Yes | Minutes | The rules can be made to fit the past |
| Out-of-sample backtest | History you did not tune on | Mostly not | Minutes | The rules generalise to other past data |
| Forward test (demo) | Live prices | No | Weeks to months | The rules and the EA work in live conditions |
| Live (small size) | Live prices, real money | No | Months | Real fills, real slippage, real you |
How long should a forward test run?
Long enough for enough trades to compare with the backtest — as a rough guide, at least 30 to 50 trades, and through at least one change in market conditions. Then compare, trade by trade where you can:
- Is the average win and loss similar to the backtest?
- Is the win rate within a reasonable range?
- Are the spreads and slippage close to what the backtest assumed?
A forward test that matches the backtest's character is a good sign even if the profit is lower. One that behaves differently means the backtest was measuring something that is not there.
The order that saves the most time
- Backtest a quick version on 1-minute OHLC to screen the idea.
- Tune on the in-sample period; judge on the out-of-sample period.
- Validate the survivor on real ticks with realistic costs — every tick vs real ticks.
- Forward test on demo.
- Go live with the smallest size your broker allows.
Backtest on our servers, forward test on yours
TradeSmithy's Pro plan queues backtests on our servers — pick the symbol, dates, deposit, spread and modelling mode, and get the equity curve and full trade list back, exportable to Excel. Split your date range into in-sample and out-of-sample runs, then export the EA to MT5 or MT4 and forward test it on your own demo account. Start free to build it, or see Pro for 50 server backtests a month. The full setup is in our MT5 backtesting guide.
Frequently asked questions
Is backtesting accurate?
As accurate as its data, costs and honesty. Out-of-sample testing and realistic spread close most of the gap between a backtest and reality.
Can I skip forward testing if my backtest is good?
You can, and it is how most traders discover their backtest was fitted. A demo forward test costs nothing but time.
Should I forward test on demo or live?
Demo first, then live at minimum size. Demo fills can be better than live fills, so the final check has to involve real money.
What is walk-forward testing?
Repeating tune-then-test across several consecutive periods, rather than once. We cover it in a separate post on walk-forward optimisation.
Keep reading
How to Backtest an Expert Advisor in MT5, Step by Step
Every Strategy Tester setting that changes the result, the report numbers that matter, and the mistakes that make a backtest look better than it is.
5 min readCan You Make Money With a Trading Bot? An Honest Answer
Some bots make money, most bought ones don't, and no backtest guarantees either. What decides the outcome, and the realistic ways people earn from EAs.
5 min readGrid vs Martingale EA: The Math Behind the Blow-Up
Grid and martingale EAs post smooth equity curves until they don't. The arithmetic of lot growth and losing streaks, and what to do if you still want one.
4 min read