You will learn
- A 5-step testing process and in-sample / out-of-sample splits
- Manual backtesting done right: hide the future, record in R, sample ≥ 100
- 8 required metrics: expectancy, profit factor, win rate, max DD, recovery factor, Sharpe/Sortino, MAE/MFE, R distribution
- Detecting overfitting: number of parameters, sensitivity, walk-forward
- Monte Carlo for expected drawdown and a 'stop the system' rule
- Backtesting in the MT5 Strategy Tester: tick mode, spread, latency and common traps
Who it's for
Traders who want to evaluate a manual system seriously, or are preparing to move to an EA.
Read first
PRO-01, PRO-02
An untested system is just a belief. A badly tested system is even more dangerous, because it gives you false confidence. This document presents a quantitative-standard testing process that still works for manual traders: how to backtest without fooling yourself, the minimum set of metrics, how to detect overfitting, and how to use Monte Carlo to know your system's "normal" drawdown before it happens for real.
01 Testing is for falsifying, not confirming
Traders usually backtest to prove their system works. That is the fastest way to fool yourself: you "see" the good setups, ignore the bad ones and tweak the rules until the past looks perfect. Scientists do the opposite: they try to disprove the hypothesis. Only a system that survives a serious attempt at falsification deserves real money.

Figure 1. The 5-step process. Step 4 (validation on unseen data) is where most "beautiful" systems are eliminated, and that is the point.
The hypothesis must be writable
Before looking at any chart, write all the rules down in a true/false testable form:
"Buy when: (1) D1 structure is up, or ranging at the lower edge; (2) H4 price touches a D1 zone (candle body within the zone ± 0.2 ADR); (3) the H4 candle has body/range < 0.35 and a lower wick ≥ 50% of the range; (4) candle volume ≥ 120% of the 20-bar average; (5) the next candle breaks the signal candle's high. SL = min(signal low, lowest of the last 3 touches) − 0.1 ADR. TP = next D1 zone − 0.1 ADR; skip if R:R < 1.5. Pending order expires after 3 candles."
If a rule cannot be written like that ("the zone looks strong"), it cannot be tested, and it cannot be repeated either.
02 Manual backtesting done right
For price action traders, manual backtesting is still the main tool because many rules are not yet coded. But it must be run like an experiment:
- Hide the future. Use a "bar replay" tool (e.g. TradingView) or scroll back and advance candle by candle. Never look at the whole chart and then mark setups: your brain will "see" highs and lows nobody could see at the time.
- Record every setup, including skipped ones. Each time the rules trigger, log a line: date, direction, score, R result (or "not filled", "skipped for R:R"). Skipped setups tell you frequency and reasons.
- Score R by rule, not by feel. Price hits SL before TP → −1R, even if "it would have won with a bit more room". Hits TP → +target R. Time-out (e.g. 15 candles) → close at the candle close, record the actual R.
- Minimum sample. ≥ 100 trades across at least two market regimes (a strong trend phase and a range phase). 30 trades in one good month mean nothing.
- Split the data before you start. 70% in-sample (rules may be tweaked) and 30% out-of-sample (run once, no changes). If you change the rules after seeing the out-of-sample, it has become in-sample.
Hindsight bias: you "see" support because you already know price bounced there. The fix: draw zones before advancing candles, screenshot the zone map at the start of each week of the backtest period, and use only zones already drawn. If a setup occurs at a zone you hadn't drawn → it doesn't count.
03 Eight required metrics
| Metric | Formula / meaning | Reference threshold |
|---|---|---|
| Expectancy (E) | Total R / number of trades | ≥ +0.15R for manual systems; ≥ +0.1R for high-frequency EAs |
| Profit factor (PF) | Gross profit / gross loss (absolute) | ≥ 1.4 out-of-sample. PF > 2.5 in-sample is often overfit |
| Win rate | Winners / total | Only meaningful with the average R. 35% at 2.5R beats 60% at 0.8R |
| Max drawdown (MDD) | Largest peak-to-trough decline, in R and % | MDD ≤ 15R at 1% risk → 15% of the account |
| Recovery factor | Net profit / MDD | ≥ 3 over ≥ 100 trades |
| Sharpe / Sortino | Average return / standard deviation (Sortino counts downside deviation only), monthly or per trade | Monthly Sharpe ≥ 0.3 (≈ 1.0 annualised) is acceptable for an individual trader |
| MAE / MFE | Each trade's largest open loss / open profit, in R | Used to optimise SL/TP (below) |
| R distribution | Histogram of each trade's R | Largest winner ≤ 20% of total profit; otherwise results depend on luck |
Remove the single largest winner and recalculate E. If E drops by more than 30% or turns negative, your system is living off one lucky event. Good systems spread their profit across many trades.
04 MAE / MFE: data to optimise stops and targets
For each trade, record two more numbers: MAE (Maximum Adverse Excursion: the deepest the trade went against you, in R) and MFE (Maximum Favourable Excursion: the furthest it went in your favour, in R).

Figure 2. Each dot is a trade. Green: winners; red: losers. Winners rarely have MAE beyond 0.7R, suggesting the stop could be tighter. Many losers had an MFE of 0.5–1R, suggesting an early partial close or a breakeven stop at +1R.
- Is the stop too wide? If 90% of winners have MAE < 0.6R, you are paying 1R of risk for something that needs only 0.6R. Tightening the SL by 30% raises R:R with almost no change in win rate. (Always re-verify out-of-sample.)
- Is the target too far? If many losers had MFE ≥ 1R, a "move SL to breakeven at +1R" rule would turn them into 0R instead of −1R, but it will also cut some winners. Calculate E with and without the rule to decide.
05 Detecting overfitting
Overfitting is when a system "memorises" the past instead of learning a pattern. Signs:
| Sign | Example | How to check |
|---|---|---|
| Too many parameters | 9 filters, each with its own threshold | Rule of thumb: ≤ 1 free parameter per 30 trades in the sample |
| "Odd" parameters | MA 37, RSI 68, volume 143% | Try 120/150/180%: if only 143% is profitable, it is noise |
| In-sample far outperforms | PF 3.2 in-sample, 1.1 out-of-sample | Out-of-sample should reach ≥ 60% of in-sample performance |
| Fails on similar pairs | Profitable on EURUSD, losing on GBPUSD | Good price action systems usually transfer between major pairs |
| Sensitive to start date | Starting 1 Jan profits, starting 15 Jan loses | Run with 5 different start dates |

Figure 3. Two systems with similar in-sample equity curves. Out-of-sample, the healthy system keeps rising at a similar slope; the overfit one flattens and then falls.
Walk-forward
Instead of a single 70/30 split, divide the data into rolling windows: optimise on 12 months → test on the next 3 → slide forward 3 months → repeat. Stitch all the test segments into one "walk-forward" equity curve: the most honest estimate of future performance. Walk-forward efficiency = annual walk-forward return / annual in-sample return; ≥ 50% is good.
06 Monte Carlo: know "normal" drawdown before it happens
The order of trades in a backtest is one of millions of possible orders. With the same 120 trades, if 10 losers happen in a row at the start instead of scattered, the drawdown is very different, even though the end result is the same. Monte Carlo answers: "for this system, which drawdown is normal and which is abnormal?"

Figure 4. Randomly reshuffling 120 trades (1% risk) six times. The end point is almost the same; the path, and the drawdown, differ significantly. The bold line is the original order.
Process (Excel/Google Sheets or Python):
- Take the list of R values from ≥ 100 trades.
- Shuffle the order randomly (or resample with replacement), compute the equity curve at your planned % risk, record the max drawdown.
- Repeat 1,000–10,000 times.
- Take the 95th percentile of max drawdown: the "worst normal drawdown". Take the 99th percentile: the "alarm drawdown".
System stop rule: if real drawdown exceeds the 95th percentile → halve risk. Beyond the 99th percentile → stop, go back to demo, and investigate whether the market has changed or you broke the rules. This separates a "normal losing streak" from a "broken system" with data instead of feelings.
07 Backtesting in the MT5 Strategy Tester
Once the system is coded (PRO-05), the Strategy Tester can test thousands of trades in minutes. But results are only trustworthy if it is configured correctly:
| Setting | Recommendation | Why |
|---|---|---|
| Modelling mode | "Every tick based on real ticks" for the final test; "1 minute OHLC" for quick optimisation | "Open prices only" ignores SL/TP being hit within a candle |
| Spread | Current, or fixed at the broker's average London spread + 20% | A zero spread makes scalping strategies look falsely profitable |
| Latency | Enable random delay | Market orders are not filled instantly |
| Data | Download full history from the real broker that will run the EA; check for data gaps | Other brokers have different server times and spreads |
| Period | ≥ 3 years, including 2020 (extreme volatility) and a ranging year | Two market regimes |
| Optimisation | Only 2–3 parameters, coarse steps; choose a stable parameter region, not the peak | The optimisation peak is usually overfit |
| Forward test | Use the Forward 1/3 or 1/4 feature | Automatic out-of-sample |
EA-specific traps: lookahead (using iHigh(..., 0) of the running candle as if it had closed), repainting (ZigZag/fractal indicators changing past points), tick volume differing between brokers. PRO-05 handles each one in code.
08 System evaluation report template
Every system needs a one-page report before it runs real money. Example values are illustrative:
| Item | Value |
|---|---|
| System name / version | PA reversal + VSA, v1.2 |
| Markets / timeframes | XAUUSD, EURUSD, GBPUSD · H4 signal, D1 context |
| In-sample period | 01/2021 – 06/2024 (n = 164) |
| Out-of-sample period | 07/2024 – 06/2026 (n = 71) |
| E (in / out) | +0.31R / +0.24R |
| PF (in / out) | 1.9 / 1.6 |
| Win rate (in / out) | 44% / 41% |
| MDD (in / out) | 9.8R / 11.2R |
| Recovery factor (total) | 4.1 |
| Largest winner / total profit | 7% |
| Monte Carlo MDD P95 / P99 (1% risk) | 13.5% / 17.8% |
| Walk-forward efficiency | 68% |
| Free parameters | 4 (body/range threshold, volume %, SL buffer, expiry) |
| Decision | Demo 2 months → live at 0.5% → 1% after 30 trades with E > 0 |
09 Summary
- Test to falsify. Write rules down in a testable form before looking at the chart.
- Manual backtest: hide the future, record every setup, score R by rule, ≥ 100 trades across ≥ 2 regimes, split 70/30 first.
- 8 metrics: E, PF, win rate, MDD, recovery, Sharpe/Sortino, MAE/MFE, R distribution. The "one trade" rule.
- Overfitting: ≤ 1 parameter per 30 trades, "round" parameters, out-of-sample ≥ 60% of in-sample, walk-forward efficiency ≥ 50%.
- Monte Carlo for MDD P95/P99 → data-driven rules to cut risk / stop the system.
- MT5 Tester: real ticks, real spreads, latency, ≥ 3 years, optimise ≤ 3 parameters, choose a stable region.
References
- Robert Pardo, The Evaluation and Optimization of Trading Strategies, 2nd ed., Wiley: walk-forward analysis.
- Ernest P. Chan, Quantitative Trading: backtest pitfalls, lookahead bias.
- John Sweeney, Maximum Adverse Excursion: MAE/MFE.
- David Aronson, Evidence-Based Technical Analysis: data-mining bias.
- MetaQuotes, MQL5 Reference: Strategy Tester tick modelling and forward testing.
- BMR Master Trade internal EA testing process.
Study with a community
Questions on this document? Join the BMR trader community on Telegram to discuss the exercises and keep each other accountable. Trading costs matter too: our cashback pays you back on every lot.
Join on TelegramEducational content, not investment advice. Trading forex, gold, indices and CFDs on margin carries a high risk of losing capital; past or simulated results do not guarantee future results. You are fully responsible for your trading decisions. Part of the BMR Trader Library (© BMR Master Trade), compiled from the references listed in each document.