Part 2: The higher-timeframe trend · Chapter 4 of 14 · 7 min

The higher-timeframe trend

Three simple rules to say whether the higher timeframe is rising or falling: the close above or below the 20-bar exponential average, above or below the close of 5 bars earlier, the break of the high or low of the last 10 bars. On the same bars they give different answers: all three agree on only 61-62% of bars, and the trend periods are 166 (H4) and 29 (D1) with the average, 249 and 40 with the 5 bars, 51 and 7 with the 10-bar break. A «D1» trend has, in ten months, very few periods to judge it on.

A trend must be defined with a rule

«The higher trend is bullish» is a sentence everyone reads in their own way: for one it means rising highs and lows, for another that the price sits above an average, for another that it has broken a high. To measure you need a rule: given the higher chart (closed bars only), the trend is +1, −1 or 0.

We chose three, simple and common:

DefinitionThe trend is +1 if...The trend is −1 if...
20-bar averagethe close sits above the 20-bar exponential averageit sits below
5-bar comparisonthe close sits above that of 5 bars earlierit sits below
10-bar breakthe close breaks the high of the previous 10 bars (and stays +1 until it breaks the low)it breaks the low of the previous 10 bars

The 20-bar exponential average weighs recent bars more: with 20 bars the «memory» is about 20 bars (20 days on D1, 80 hours on H4). The 5-bar comparison looks at only two points. The 10-bar break is a breakout (book 12) used as a state.

How long they last

On the 1,270 H4 bars and the 211 D1 bars:

DefinitionTimeframeBars up / down / no trendPeriodsMedian durationMaximum
20-bar averageH4625 / 625 / 201663 bars (12 hours)53
20-bar averageD181 / 110 / 20293 days36
5-bar comparisonH4633 / 631 / 62494 bars21
5-bar comparisonD1103 / 103 / 5405 days19
10-bar breakH4607 / 633 / 305119 bars (3 days)63
10-bar breakD193 / 98 / 20715 days50

Three observations.

  1. «Fast» trends change continuously: with the 20-bar average a period lasts 3 bars on median; with the 5-bar comparison 4-5. A «trend» that changes direction every three days is, in practice, a description of the last week.
  2. «Slow» trends are few: the 10-bar break gives only 7 periods on D1 in ten months. A long period can contain a month of movement, but with seven periods no measurement has much information.
  3. On D1 the number of periods is minimal: 29 with the average, 40 with the comparison, 7 with the break. These numbers decide how far to trust every result of the book on the daily chart: a result that depends on 29 independent trends has a large error, even if hourly candles are thousands.
Figure 1. D1 trend with three definitions: 20-bar average (pink), comparison with 5 bars earlier (blue), 10-bar break (dashed grey). The first two change often; the third stays put for weeks.Data: gold, XAUUSDT perpetual future (real candles) · daily (D1) · from 15 Dec 2025 to 5 Oct 2026.
Read the chart in words

Daily gold chart with, below, three step lines between +1 and −1: the pink and blue ones change continuously, the dashed grey one much less.

How much they agree

On the bars where all three have a direction:

ComparisonH4D1
All three equal62%61%
20-bar average = 5-bar comparison77%76%
20-bar average = 10-bar break82%82%
5-bar comparison = 10-bar break64%63%

On almost four bars out of ten at least one definition says something different from the other two. «The trend» does not exist as a single number: it depends on how you define it, and the definitions disagree on about 38% of bars. That is why in the next chapters we test all three, and report all the results, not just the best one.

How to use them

  • Choose a single definition and write it beforehand, not the one that gives the best result.
  • Calculate it only on closed bars (chapter 2).
  • Declare the number of periods: it is the measure of the sample's information.
  • A slow definition (10-bar break) gives few periods, a fast one (5 bars) gives many but unstable: it is a compromise, not a solution.

What to do

  1. Write the trend definition in one line (for example «D1 close above the 20-bar average»).
  2. Count the periods of your sample before trusting it.
  3. Compare at least two definitions: if they do not agree, the «trend» is an opinion.
  4. Do not mix timeframes and definitions after the fact.
  5. Update the trend at the close of the bar, not during it.

Procedure in four steps

  1. Choose the trend definition and the timeframe.
  2. Calculate the state (+1, −1, 0) at every bar close.
  3. Count the periods and their duration.
  4. Compare with a second definition and report the disagreement.

Exercises

Chapter exercises

1. On the D1 chart the 10-bar break gives only 7 trend periods in ten months. What does it mean for the measurements?

2. The three trend definitions agree on all bars only 61-62% of the time. What does it imply?

3. With the 20-bar average on the H4 chart a trend period lasts 3 bars on median. How many hours is that?

4. Why is the higher trend calculated only on already-closed bars?

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.