Part 1: What a backtest is · Chapter 2 of 14 · 8 min
The backtest that looks perfect
Trying the 480 rules on the whole period, the best (80-candle breakout, 1.5 ATR stop, 3 R target, 48-candle duration) gives 79 trades at +0.74 R, +58.1 R in total, profit factor 2.37 and a drawdown of only 6.1 R. It looks like a system. But it is the best of 480, the mean of all the rules is −0.017 R, 189 out of 480 are positive and the error on its mean is ±0.43.
Let us run the grid
We apply the 480 rules of chapter 1 to all the candles (15 December 2025 - 6 October 2026) and for each we look at the mean R per trade. Here is the whole grid at once:
| Measure | Value |
|---|---|
| Mean of the mean R of the 480 rules | −0.017 |
| Median | −0.046 |
| 5th and 95th percentile | −0.233 and +0.247 |
| Rules with positive mean R | 189 out of 480 |
| Rules with the lower limit of the interval above zero | 32 |
| Rules with the upper limit below zero | 95 |
| Trades per rule | median 210, from 72 to 499 |
The average rule of the grid neither earns nor loses; one in fifteen (32 out of 480) has a result that, taken alone, seems to stand apart from zero. Whoever glances at the grid picks that one.
The best
Sorting by mean R (with at least 30 trades, so as not to choose rules with two lucky shots) the first is 80-candle breakout, 1.5 ATR stop, 3 R target, maximum duration 48 candles:
| Measure | Value |
|---|---|
| Trades | 79 (from 22 December 2025 to 28 September 2026) |
| Mean R ± error | +0.74 ± 0.43 |
| Winning | 46% |
| Average win / average loss | 2.79 R / 0.99 R |
| Profit factor | 2.37 |
| Sum | +58.1 R |
| Maximum drawdown | 6.1 R |
| Median risk | 28.4 $ |
The example rule of chapter 1 made −4.6 R. This one makes +58.1 R, with a drawdown of 6.1 R: nine times less than the gain. The account adds up: 0.46 × 2.79 − 0.54 × 0.99 = 0.75. It is the kind of result that goes in a presentation.
Read the chart in words
Daily gold chart with, below, two cumulative R curves: the best rule of the grid, rising strongly, and the example rule, near zero.
The first ten are relatives
Let us look at the ten rules with the highest mean R. They are all 80-candle breakouts, with mean R from +0.36 to +0.74 and sums from +31 to +58 R, and they differ in stop, target and duration. The second is the same rule with a 24-candle duration: +0.66 ± 0.38 over 86 trades.
Read the chart in words
Daily gold chart with, below, five almost parallel cumulative R curves, all rising.
This is already information: the high points of the grid sit close together, in the region N = 80 with a 3 R target. It may mean that there is something there, or that that region was lucky in the period. The chapters that follow serve to tell the two cases apart.
What is behind the nice number
The story "+58 R, drawdown 6 R, profit factor 2.4" tells the truth, but leaves out almost everything needed to judge it:
- It is the best of 480. Taken alone it looks exceptional; taken as the first of a list of 480 it is worth less. How much less, we measure in chapters 3 and 9.
- It is 79 trades, with an error of ±0.43. The lower limit of the interval is +0.31: positive, but less than half the value. With 79 trades and a deviation of 1.94 R chance has ample room.
- The grid has a favourable direction. Breakouts average +0.093 R, fades −0.128. In the period, whoever followed the moves did better than whoever went against them: it is a property of those ten months (chapter 12).
- The terrain is uneven. With N = 80 there are 96 rules and 42 are positive: even in that region more than half are negative. The best is a high point in rough terrain.
- It has not been tried on new data. The whole grid uses the same 4,865 points: choice and test are the same thing.
None of these points says the rule is wrong. They say that +0.74 R is not yet the number of a rule, but the maximum of a grid observed in a sample.
What to do with it
- Write how many rules you tried next to the result: "best of 480", not "I found a rule".
- Look at the whole grid, not just the first: mean, median, share of positive rules, how many have a lower limit above zero.
- Ask whether the first ones are relatives: if they differ by one parameter, they count as a single trial.
- Always put next to the number trades, error and period.
- Do not confuse a small drawdown with safety: 79 trades are few to have seen the worst.
Procedure in four steps
- Run the grid and save all results, not just the best.
- Write mean, median and share of positive rules of the whole grid.
- See whether the best rules are relatives (same parameters, one variant).
- Always report the result of the best together with "best of N", trades and error.
Exercises
Chapter exercises
1. How many of the 480 rules have a positive mean R over the whole period?
2. The best rule wins 46% of the time, with an average win of 2.79 R and an average loss of 0.99 R. What is the expected mean R?
3. "The system made +58 R with a drawdown of 6 R." What information is missing to judge it?
4. The ten rules with the highest mean R are all 80-candle breakouts. What does it suggest?
Have a question or want to share your exercise?
Post in the community, or join the free signals room on Telegram.
Educational content, not financial advice. Trading involves risk.