Part 2: The higher-timeframe trend · Chapter 6 of 14 · 8 min
The directional filter
Keeping only the entries in the direction of the higher trend moves the mean R of book 12's 480 rules by +0.02-0.03 on H4 and by +0.06 on D1 with the 20-bar average and the 5-bar comparison (395-399 rules out of 480 improve), but by −0.02 with the 10-bar break; random series give between −0.01 and +0.02 on average, with bands of ±0.1 in which all the values fall. On the best rule, the 80-candle breakout, the filter does not help: +0.74 R without a filter, +0.68 with H4, +0.56 with D1 (55 trades instead of 79).
What it is
A directional filter keeps an entry only if its direction matches that of the higher trend (known at the close of the last higher bar). A buy only with trend +1, a sell only with trend −1. It is the most widespread form of the advice «trade in the direction of the bigger chart».
We test it on the 480-rule grid of book 12 (breakout and fade, five lengths, four stops, four targets, three durations) with the three trend definitions (chapter 4) and the two timeframes (H4 and D1). For each rule we calculate the mean R with and without the filter; the filter also changes which signals are taken, because a discarded position frees the slot for the next signal.
For a fade rule (which enters against the movement) the trade's direction is opposite to the signal: the filter looks at the trade's direction.
The result on the 480 rules
The grid, without a filter: mean R −0.017, 226 trades per rule; breakout +0.093, fade −0.128.
| Trend (filter: only with the trend) | Change in mean R | Rules that improve | Average trades | Random series (30): mean (5th-95th) |
|---|---|---|---|---|
| H4, 20-bar average | +0.023 | 259 out of 384 | 118 | +0.015 (−0.089 / +0.117) |
| H4, 5 bars | +0.025 | 269 out of 384 | 117 | −0.006 (−0.109 / +0.087) |
| H4, 10-bar break | +0.032 | 299 out of 432 | 118 | +0.006 (−0.103 / +0.099) |
| D1, 20-bar average | +0.059 | 395 out of 480 | 106 | −0.005 (−0.101 / +0.108) |
| D1, 5 bars | +0.062 | 399 out of 480 | 115 | +0.002 (−0.082 / +0.118) |
| D1, 10-bar break | −0.020 | 183 out of 480 | 106 | −0.001 (−0.086 / +0.104) |
For breakout and fade, separately (filter «with the trend»):
| Trend | Change on breakouts | Change on fades |
|---|---|---|
| H4, 20-bar average | +0.014 | +0.036 |
| H4, 5 bars | +0.017 | +0.037 |
| H4, 10-bar break | +0.012 | +0.056 |
| D1, 20-bar average | +0.040 | +0.077 |
| D1, 5 bars | +0.046 | +0.077 |
| D1, 10-bar break | −0.017 | −0.023 |
Read the chart in words
Daily gold chart with, below, four cumulative R curves: the pink on top, the grey close by, the blue lower, the dashed at the bottom.
Five readings.
- The filter «with the trend» moves the mean R by +0.02-0.06 in five cases out of six, and makes most rules improve (up to 399 out of 480).
- But all sit inside the band of chance (about −0.1 to +0.1): the random series give on average from −0.01 to +0.02 and in single series reach +0.12. A +0.06 on D1 cannot be told from luck.
- «Many rules improve» does not count as much as it seems: the 480 rules are variants of one another and use the same prices. If something holds for one, it holds for nearly all; they are far fewer than 480 independent tests.
- The gain sits in the fades: the fades' mean is −0.128 and the filter takes it to about −0.05 with D1 and −0.07/−0.09 with H4, removing the fades against the trend, the worst ones. It stays negative. On breakouts the filter gives +0.01-0.05.
- The 10-bar break on D1 worsens (−0.020): it has only 7 trend periods (chapter 4), too few.
The best rule
The 80-candle breakout (the plan) has, without a filter, +0.74 ± 0.43 R over 79 trades. With the filter:
| Filter | Trades | Mean R ± error | Sum |
|---|---|---|---|
| None | 79 | +0.74 ± 0.43 | +58.1 R |
| H4, 20-bar average, with the trend | 79 | +0.68 ± 0.43 | +54.1 R |
| D1, 20-bar average, with the trend | 55 | +0.56 ± 0.52 | +30.8 R |
| D1, 20-bar average, against the trend | 21 | +0.64 ± 0.83 | +13.4 R |
The filter does not improve the best rule: it removes trades (from 79 to 55 with D1), the mean R falls (from +0.74 to +0.56) and the error widens. It is the consequence of chapter 5: the breakout is already almost always in the trend's direction (76%), so the filter discards little and what it discards (the trades against the D1 trend, 21 out of 79) is worth +0.64 R, as much as the others. In this sample, trades against the higher trend were no worse.
What follows
- A directional filter is not proven: it moves by a few hundredths of R in a direction that chance can give.
- Where it seems to help, it helps the weak rules (fades), which stay negative.
- The best rule does not need it: its entry already contains the trend.
- The filter reduces trades (from 226 to 106-118 on average) and widens the error.
What to do
- Write the filter beforehand (trend definition, timeframe, direction) and use it only if written.
- Report all the definitions tried, not the one that gives the best result.
- Compare with random series and look at the band, not the mean.
- Do not count 480 rules as 480 tests: they are variants of the same idea.
- Look at what it does to your rule, not to the average: often the best rule does not need it.
Procedure in four steps
- Write the filter: trend definition, timeframe, and «with» or «against».
- Calculate the mean R with and without the filter, and how many rules improve.
- Repeat on random series and compare with the 5th-95th band.
- Look at what it does to the rule you really use.
Exercises
Chapter exercises
1. With the D1 trend filter (20-bar average) 395 rules out of 480 improve, by +0.059 on average; random series give a band from −0.10 to +0.11. What do you conclude?
2. Why does the filter «with the trend» improve mostly the fades (from −0.128 to about −0.05)?
3. The 80-candle breakout makes +0.74 R without a filter and +0.56 with the D1 trend (55 trades). Why does the filter not help?
4. Why do you report all the trend definitions tried and not just the best one?
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.