Why Traders Use Multiple Timeframes
By the end of this lesson you should be able to say, for any multi-timeframe idea you meet, which of three jobs the longer interval is doing, what it costs to use it, and what test would show whether it is earning its place. That last question is the one that separates a filter from a decoration, and it is the reason this lesson comes before any AFL.
Timeframe and interval are not the same word
Section titled “Timeframe and interval are not the same word”The course uses these two terms precisely, and multi-timeframe work is where the distinction starts to matter.
An interval is a concrete bar size: daily, weekly, 5-minute. It is a property of the data. A timeframe is a conceptual horizon: “the weekly picture”, “the trading day”. One timeframe is normally expressed through one interval, but the horizon is the idea and the interval is the implementation.
The confusion costs real money in AmiBroker specifically, because there are two completely different ways to change the interval a formula sees, and only one of them is what most people want. If you simply want to analyse weekly bars, you change the Periodicity setting in the Analysis window, or the interval of the chart. AmiBroker’s own documentation puts a highlighted warning at the top of the multi-timeframe chapter saying that the timeframe functions are not intended to replace the Periodicity setting, and that they exist only for formulas that genuinely mix several intervals at once.
The three-timeframe model
Section titled “The three-timeframe model”The most widely taught structure divides the decision into three jobs, each on a different horizon. The names vary between authors; the jobs do not.
Three jobs, three horizons
- ContextLongest interval. Is this instrument a candidate at all?
- SetupTrading interval. Has a condition worth acting on formed?
- TriggerShortest interval. What exact event puts the order in?
- ManagementTrading interval. Stops, targets, exit
Context is a gate. It answers a question about the environment rather than about the instrument’s current position: is the weekly structure rising, is the index above its long average, is volatility in the range this system was designed for. A gate does not generate trades. It removes candidates.
Setup is the condition that makes an instrument interesting today. In this course’s vocabulary a setup is a state — something true across a span of bars, such as price holding above a rising average after a pullback.
Trigger is the event that converts a candidate into an order: a cross, a break of yesterday’s high, an opening range breakout. Events happen on one bar. States persist.
AmiBroker ships a worked example of exactly this shape. The multi-timeframe chapter of the User’s Guide includes a formula it calls the Simplified Triple Screen System: a weekly MACD histogram supplies the context, an Elder-ray reading on the daily bars supplies the setup, and a new daily high supplies the trigger. It is a useful piece of code to read once you have finished this part, because every mistake the next two lessons warn about is one it avoids.
Three is a convention, not a law
Section titled “Three is a convention, not a law”Nothing requires three horizons. Plenty of workable systems use two: a weekly gate and a daily rule. Some use one interval and no gate at all. The number of horizons should follow from the question, and each extra horizon has to justify the parameters it brings with it — a point we return to at the end of this lesson.
What a longer interval actually adds
Section titled “What a longer interval actually adds”Here is the part that is usually skipped. A weekly bar is not new information. It is the same daily data, aggregated. Every weekly open, high, low and close in your database is computed from daily bars you already had. Compressing daily bars to weekly bars adds nothing that was not present; what it does is discard things.
That is the whole mechanism, and understood properly it is a real one. Aggregation suppresses features whose scale is smaller than the aggregation window. A three-day counter-trend move disappears inside a weekly bar. So does a single-day gap that fills the next morning. What survives compression is the structure whose scale exceeds a week.
So a higher-timeframe filter is a scale filter. Saying “only trade long when the weekly trend is up” is a compact way of saying “only trade long when the direction that survives weekly aggregation is up”. Whether that is useful depends entirely on whether the effect you are trading has any relationship to structure at that scale. It is an empirical question, and it has a different answer for different instruments and different periods.
Two other things a longer interval can add, both of them practical rather than statistical:
- Fewer decisions. A weekly gate that is true 55% of the time removes nearly half your candidate days. Where trading costs dominate, that alone can change the arithmetic of a system, irrespective of whether the gate has any predictive content.
- Less parameter sensitivity in the gate. A 10-period average of weekly closes moves slowly, so small changes to the period change the gate’s output on relatively few days. Slow-moving gates tend to produce results that vary less across nearby parameter values, which makes them easier to evaluate honestly. That is a property of the smoothing, not evidence that the gate works.
What it costs: lag
Section titled “What it costs: lag”Everything a higher interval gives you, it gives you late. This is not an implementation detail you can code around; it is the definition of aggregation. A weekly bar cannot be complete until the week is complete.
When a completed weekly value becomes usable on daily bars
Read that diagram carefully, because the next two lessons are built on it. The value describing week 1 becomes legitimately available on the last bar of week 1. Through the whole of week 2 the most recent completed weekly value is still week 1’s. A daily rule running on the Wednesday of week 2 is entitled to know how week 1 ended. It is not entitled to know how week 2 will end.
The cost of that is concrete. A weekly moving-average gate can take one to two weeks to switch state after a turn in the underlying daily data, because the weekly average needs completed weekly bars to move. If your holding period is three days, a gate with a one-to-two-week response time may be filtering yesterday’s regime. That is not an argument against weekly gates; it is an argument for checking that the gate’s response time is short relative to the trade’s life.
When multi-timeframe analysis is just more parameters
Section titled “When multi-timeframe analysis is just more parameters”Add a weekly gate and you have not added one decision. You have added, at minimum: which interval, which indicator, which lengths, which comparison, and how the gate combines with the daily rules. Five choices, each with a range of plausible values.
That matters because of how the choices get made. Almost nobody picks a weekly gate, codes it and accepts the outcome. They try 10-week and 20-week and 30-week; they try the average of weekly closes and the average of weekly typical prices; they try “above the average” and “above a rising average”. Then they keep the combination that produced the best result. With enough combinations, some of them will look good on any history, whether or not the idea has content — and the more combinations tried, the better the best of them looks, purely from selection.
Three questions worth asking before adding a horizon:
- What is the gate supposed to remove? If you cannot name the kind of losing trade it is meant to exclude, you are unlikely to be able to tell whether it worked.
- Does the system improve, or does it merely trade less? A gate that removes 40% of trades and 40% of the profit has done nothing except lower the sample size. Compare like with like: per-trade expectancy, not totals.
- Would a nearby parameter give a different verdict? If a 10-week gate helps and a 12-week gate hurts, you have measured noise. This is what Part 31 calls a fragile optimum, and it is the normal outcome when a gate is chosen by search.
The honest research design is the boring one: build the daily system first and record its results. Then add the gate, change nothing else, and run the identical universe and period again. The difference between the two runs is the gate’s contribution, and it is the only number that answers the question. Part 27 sets this up properly, Part 30 lists the ways it can still mislead you, and Part 32 shows how to check that the gate’s benefit survives out of sample.
What changes for you
Section titled “What changes for you”The vocabulary is now precise: interval is the bar size, timeframe is the horizon, context gates, setups qualify, triggers fire. A longer interval adds no information — it removes detail below its own scale, and it returns its verdict late. Those two properties, together, are the entire case for and against multi-timeframe analysis, and both of them are measurable on your own data rather than matters of opinion.
The next lesson gets concrete: how AmiBroker actually switches a formula’s price arrays to another interval, what happens to everything else in the formula when it does, and why the compressed result is unusable until it has been expanded back.
Check your understanding
Sources for this lesson
3 verified · checked 2026-08-31
- 01AmiBroker User's Guide — Multiple Time Frame Support in AFLamibroker.com/guide/h_timeframe.html2026-08-31
- 02AmiBroker User's Guide — New Analysis window§ Defining the Date/Time Rangeamibroker.com/guide/h_newanalysis.html2026-08-31
- 03AFL Function Reference — TimeFrameSetamibroker.com/guide/afl/timeframeset.html2026-08-31
Every technical claim on this page was checked against the official AmiBroker documentation on the date shown. Where the course disagrees with folklore, the source is how you can tell which one to trust.