Mixing timeframes without looking into the future
A daily trend filter on an hourly chart is a sound idea that is easy to test wrongly. The rule is simple: a higher-timeframe candle only counts once it has closed.
The idea and the trap
A common plan is to trade an hourly chart only in the direction of the daily trend. For example: take hourly buy signals only when the daily close is above its 50-day average.
The idea is reasonable. The trap is in the word "close". A daily candle does not have a close until the day is over. Any test that uses today's daily close to filter a trade taken at lunchtime is using a price that did not exist yet. This is look-ahead: using information in a test that was not known at the time.
A day seen from 14:00
Take a daily candle that opens at 00:00 and closes at 24:00. An hourly signal appears at 14:00. At that moment the day is 14 hours old and has 10 hours left.
Suppose price is 2% above the daily average at 14:00, then falls for the rest of the day and closes 1% below it. On the finished chart, that day is a "below average" day. A careless test looks at the finished chart, sees "below", and skips the 14:00 trade. In real time you would have seen "above" and taken it.
The careless test quietly removes trades on days that turned out badly. Its results look better than anything you could have traded.
The rule: closed candles only
The fix is one rule. A higher-timeframe value counts only from the moment its candle has closed.
For a daily filter on an hourly chart, every hourly candle of today uses yesterday's finished daily candle. Today's daily candle is first used by tomorrow's hourly candles.
The same applies to any pair. Four-hour candles on a common grid run 08:00 to 12:00, then 12:00 to 16:00. An hourly candle that closes at 15:00 may use the four-hour candle that closed at 12:00. It may not use the one that closes at 16:00, even though that candle already has three of its four hours.
Why the unfinished candle is so tempting
Charts draw the unfinished higher-timeframe candle live, so it feels like data. It is a provisional value that changes with every trade until the close.
An indicator that shows a different history after the fact than it showed live is said to repaint. A simple check is to compute the filter using data up to some past moment, then again with more data, and compare the old values. If any of them changed, the filter was reading unfinished candles. On Candlesview a screener filter set to another timeframe reads only candles of that timeframe that have already closed.
The cost of doing it properly
Waiting for the close makes the filter late. A daily filter can be up to a whole day behind. When the trend turns on a Tuesday morning, the filter only learns about it at Tuesday's close and only acts on Wednesday.
That lag is real and it belongs in the test, because it will be there in live trading. A filter that looks sharp because it used the unfinished candle will be slower and rougher in practice than its test suggested.
You can use a live higher-timeframe value on purpose, for example "price right now compared with yesterday's daily average". That is fine, because every part of it is known at the time. The rule is not "never look at today". It is "never use a number you could not have had".
Checking your own test
Three questions catch most mistakes. At the moment of each signal, was every number in the rule already final? Does the number of trades change when you switch the filter from the last closed candle to the current one? If it changes a lot, look at which trades disappeared. And do the first trades after a trend change come suspiciously early?
A clean test of a mixed-timeframe rule still proves nothing about the future. It only makes sure the past you tested is the past you could have traded.
To take away
- A higher-timeframe candle counts only after it has closed.
- Today's hourly candles use yesterday's finished daily candle.
- The delay this causes is real and belongs in the test.
Try it
Keep reading
A backtest that made 18% sounds good until you learn the market rose 30% over the same months. The comparison with holding is the first check, not the last.
21 November 2026Testing ideas · 5 minEight matches is not evidenceA scan matched 8 times and price rose after 6 of them. That feels like 75%. Here is why it says almost nothing, and what to compare it with before believing it.
20 November 2026Order flow and derivatives · 5 minWhat a liquidation map can and cannot tell youThe bright bands on a liquidation map are estimates built on assumptions about leverage. They show where pressure may sit, not where price is going.
18 November 2026Education only. Nothing here is financial advice or a recommendation to buy or sell anything; examples are arithmetic, not results. Trading involves a high risk of losing money.