Trading Strategies

Multi-Timeframe Confirmation: Trading With the Bigger Trend

How to combine a higher timeframe for direction with a lower timeframe for entries: choosing timeframe ratios, avoiding look-ahead in code, and practical rule sets for trading bots.

By AlgoXP2 min readUpdated

Several panels of the same idea across markets and timeframes

Many losing trades are perfectly good signals on their own timeframe that run straight into the opposite trend on a bigger one. Multi-timeframe confirmation addresses this: use a higher timeframe to decide direction, and a lower timeframe to decide timing. It is one of the simplest ways to improve a trading bot without adding much complexity.

The basic structure

Role Timeframe Example tools
Direction (filter) Higher, e.g. H4 or D1 100-200 EMA, Supertrend, ADX, market structure
Setup Middle, e.g. H1 Pullback, consolidation, range
Entry timing Lower, e.g. M15 Breakout of a small range, candle pattern, oscillator turn

Two timeframes are often enough: one for direction, one for entry.

Choosing the ratio

A factor of roughly 4-6 works well:

  • M5 entries → M30/H1 direction
  • M15 entries → H1 direction
  • H1 entries → H4/D1 direction

Too close (M15 and M30) and the filter adds little; too far (M5 and W1) and the filter changes so rarely that it hardly matters for timing.

Example rule set

XAUUSD, entries on M15, filter on H1:

  • Direction: H1 close above H1 EMA(100) and H1 EMA(100) rising.
  • Setup: on M15, price pulls back at least 1 × ATR(14, M15) from the last swing high.
  • Entry: M15 close above the high of the previous bar after the pullback.
  • Stop: below the pullback low or 1.5 × ATR(14, M15).
  • Exit: 2R target or H1 close below EMA(100).

Shorts mirror the rules. The H1 filter blocks counter-trend pullback trades that look valid on M15.

Coding it without look-ahead

The most common bug: using the current, still-forming higher-timeframe bar. At 10:15 the H1 bar from 10:00 is not complete; its close is not yet known. Rules:

  • Read the last closed higher-timeframe bar (index 1, not 0, in most platforms’ series).
  • In backtests, check that higher-timeframe values change only at the higher bar boundaries.
  • Be careful with indicators calculated on higher-timeframe data inside a lower-timeframe bot - verify their values against a chart of that timeframe.

Structure-based filters

Instead of moving averages, the higher timeframe can be described by market structure: higher highs and higher lows for an uptrend, lower highs and lower lows for a downtrend, with Break of Structure and Change of Character marking shifts. AlgoXP’s Kairos Market Structure Pro marks these on closed candles without repainting; Support and Resistance MTF Pro adds higher-timeframe zones to the lower-timeframe chart.

How much does it help?

Typically, a higher-timeframe filter:

  • reduces the number of trades;
  • removes a disproportionate share of losing counter-trend trades;
  • improves expectancy per trade and drawdown.

It can also remove good trades at turning points. Test filter settings across a range and on several markets; see multi-market optimisation.

Key takeaways

  • Use a higher timeframe for direction and a lower one for timing.
  • Keep a ratio of about 4-6 and limit yourself to two or three timeframes.
  • Always use closed higher-timeframe bars in code.
  • Expect fewer trades with better quality, and test the filter’s robustness.

FAQ

Which timeframe ratio should I use?

A factor of about 4-6 between timeframes is a common rule of thumb - for example M15 entries with an H1 filter, or H1 entries with an H4 or D1 filter.

Can a bot read a higher timeframe while running on a lower one?

Yes. Trading platforms, including cTrader, let algorithms request bars of other timeframes for the same symbol. The key is to use only higher-timeframe bars that have already closed.

Does adding more timeframes improve results?

Usually not beyond two or three. Each additional condition removes trades and adds parameters; past a point it mainly fits the history.

Sources and further reading

  1. StockCharts ChartSchool: Moving Averages - Simple and Exponential - chartschool.stockcharts.com
  2. StockCharts ChartSchool: Average Directional Index (ADX) - chartschool.stockcharts.com