Black Friday: up to 75% offGet deal

8 min read

How to backtest a trading strategy without fooling yourself

Systemly Team26 October 2026
How to backtest a trading strategy without fooling yourself

Most backtests are lies the trader tells themselves. They scroll back through the chart, remember the trades that worked, quietly forget the ones that did not, and conclude the strategy is brilliant. Or they tune the settings over and over until the past looks perfect, then wonder why the future refuses to cooperate. The point of a backtest is to find out whether an idea has any edge. Done carelessly, it does the opposite: it manufactures false confidence and sends you into live trading sure of something that was never true.

Quick answer: write the rules down and freeze them, test over a sample large enough to mean something, include realistic spread and costs, and judge the whole sample rather than the trades you liked. Do not keep adjusting the parameters until the equity curve is beautiful. Then forward test the frozen rules on a demo account before you risk a penny, because a clean backtest is a reason to test further, not a reason to go live.

This is educational information, not financial advice.

What a backtest can and cannot tell you

A backtest is an estimate of how a fixed set of rules would have behaved on past data. That is useful, because it filters out ideas that never worked even once. What it is not is a forecast. The market that produced your test data is gone, and nothing guarantees the next one rhymes with it. Treat a good backtest as evidence worth following up, the way a promising lab result earns a bigger trial, not as a promise of profit.

The big trap: fooling yourself

The deepest mistake is overfitting, also called curve fitting: tuning the rules so tightly to the past that they describe that exact history and nothing else. The consequence is a backtest that looks flawless and a live account that bleeds, because you optimised for noise, not for an edge. Think of it like memorising the answers to last year's exam paper. You will score full marks on that paper and learn nothing that helps when this year's questions are different. A strategy that only works with one precise set of numbers on one slice of history has memorised the paper.

Freeze the rules before you test

Write the strategy down as rules a stranger could follow: the exact entry condition, the stop placement, the target and the risk per trade. Then test those rules without changing them as you go. The moment you adjust a setting because a particular trade would have lost, you have stopped testing and started fitting. If you want to try a different rule, that is a separate test, run cleanly from the start, not a tweak mid-stream.

Count enough trades

A handful of trades proves nothing, because a run of luck in either direction can carry a tiny sample. A few dozen trades is a bare minimum to take a result seriously, and a hundred or more gives it real weight. Test across different conditions too, a trending stretch and a choppy one, so you are not judging a strategy only on the market it was born to love. The larger and more varied the sample, the less a lucky streak can masquerade as an edge.

Include the costs, all of them

A backtest that ignores the spread, commission and slippage flatters every result, and the flattery is worst for strategies that trade often. A scalping idea that looks profitable on raw price can be a loser once each trade pays the spread. Build realistic costs into the test, and assume your stops sometimes fill a little worse than the level, because in a live, fast market they will. Costs are not a footnote, they are often the difference between an edge and a slow bleed.

Bar replay or the strategy tester

Two common ways to backtest are replaying bars by hand and running an automated tester. Replaying bars one at a time, with the future hidden, is slow but honest, because you cannot peek. An automated tester like the MT5 Strategy Tester runs a coded rule set over history fast, which is powerful but makes overfitting easy if you keep optimising. Both beat scrolling a finished chart from memory. It is worth understanding how backtesting and forward practice differ before you lean on either.

Forward test before you trust it

The real test of a frozen rule set is data it has never seen, arriving one candle at a time. Run it forward on a demo account and see whether the live behaviour resembles the backtest. If it falls apart, the backtest was fitted to the past. How long to keep testing is a question of trades and conditions, not days on a calendar.

Test a plan, not a hunch

You can only backtest something with clear rules, which is why a vague hunch can never really be tested at all. Systemly is built around defined rules rather than discretion: it works from raw market data instead of chart screenshots, gives each setup a fixed entry, stop and target, and tracks the outcome of every signal openly rather than marketing a win rate. That open record is a running forward test in plain sight, which is exactly what a backtest is meant to lead to.

Frequently asked questions

What is backtesting?

It is testing a fixed set of trading rules against past price data to see how they would have performed. Done honestly, it tells you whether an idea has ever worked. It cannot tell you it will work in future, only that it is worth testing further.

How many trades do I need to backtest?

There is no magic number, but a few dozen trades is a bare minimum to take a result seriously, and a hundred or more carries far more weight. Just as important is testing across different market conditions, not only the kind the strategy was designed for.

What is overfitting or curve fitting?

It is tuning your rules so tightly to past data that they fit that history's noise rather than a real edge. The backtest looks perfect and the live results do not, because the strategy memorised the past instead of learning something that generalises.

Does a good backtest mean the strategy will work?

No. A good backtest means the idea is worth testing further, nothing more. Past performance does not guarantee future results, and a clean curve is the start of the process, not the finish. Forward test it before you trust it with money.

Should I use the MT5 strategy tester or bar replay?

Bar replay by hand is slower but harder to cheat, because the future stays hidden. The MT5 Strategy Tester runs a coded rule set over history quickly, which is powerful but makes overfitting easy if you keep optimising. Use whichever suits the strategy, and guard against fitting either way.

What is forward testing?

It is running your frozen rules on new data as it arrives, usually on a demo account, so the strategy meets price it has never seen one candle at a time. It is the honest check on a backtest, because you cannot fit rules to data that has not happened yet.

Why do my backtest results beat my live results?

Usually because the backtest was overfitted, ignored real costs, or quietly used information the trade could not have known at the time. Realistic spread and slippage, a frozen rule set and a forward test close most of that gap. If live still lags badly, trust the live result.

Honest test, honest expectations

Freeze the rules, test a real sample with real costs, judge the whole thing and then forward test before you believe it. The aim is not a pretty equity curve, it is an honest read on whether an edge exists. When you want rules you can test and a record kept in the open rather than a hunch, build the plan with Systemly and let the results speak for themselves.

Sources

Systemly.ai is not a licensed financial adviser and does not provide regulated financial advice. Trading carries a significant risk of loss and is not suitable for everyone. Past performance does not guarantee future results. Always do your own research and never risk more than you can afford to lose.

Keep reading

Get your first signal free

Pick a market. Systemly gives you entry, stop loss, targets and a size for your account. No card needed.

free lessons
40
lessons on Starter
123

Start the Academy free, no card

Starter adds the other lessons and 642 graded questions.