MTF and Repainting

Multi-timeframe reading is the whole point of this pane, and repaint is the failure mode most often mishandled when traders try to build a multi-timeframe read by hand. Both deserve a page that is honest about what th...

Written By Axiom Admin

Last updated 22 days ago

MTF and Repainting

Multi-timeframe reading is the whole point of this pane, and repaint is the failure mode most often mishandled when traders try to build a multi-timeframe read by hand. Both deserve a page that is honest about what the tool does and where the reader is on the hook to make a deliberate choice.

Three things to hold in your head before the rest of the page makes sense:

  1. Rule. A slot's timeframe must be greater than or equal to the chart's timeframe. If it is not, the script raises a runtime error naming the slot. This is a hard stop, not a silent downshift.

  2. Rule. Inside a single slot, Fast Length must be strictly less than Slow Length. Same shape of enforcement β€” runtime error, named slot.

  3. Switch. On Bar Close? is a single global control in this trim. One choice for all three slots. On for the confirmed, bar-closed read. Off for the live, intra-bar read that can repaint until the slot's current bar closes.

The two rules are hard rails. The switch is a trade you make with your eyes open. The rest of this page is mostly about the switch, because the rails tell you when you have misconfigured, but the switch is the one that can quietly distort your read even when the configuration is technically valid.

What On Bar Close? actually controls

Each slot runs a higher-timeframe request under the hood. That request can be asked one of two questions:

  • "What was the last closed slot-timeframe bar's value?" That is the on-bar-close posture. The slot returns the previous bar's confirmed value from that slot's configured timeframe. It is stable β€” once a 60-minute slot bar has closed, that value is in the books and does not change β€” but it is one slot-timeframe bar behind. On a 1-minute chart with a 60-minute slot, the slot updates once per hour.

  • "What is the live value of the current, still-forming slot-timeframe bar?" That is the off-bar-close posture. The slot returns whatever the in-progress bar on its configured timeframe is doing right now. It is earlier, sometimes by a meaningful amount. It is also capable of changing its mind as the bar develops, because the bar is not done yet.

That is the trade. Confirmation versus recency. Neither is "better." Each is honest about what it is reporting as long as you know which mode you set.

In Base, every slot obeys the same choice β€” on or off for all three. The CTX and STR versions expose per-slot repaint switches. If you need some slots to wait and others to update live, that is a version-fit question. Do not fake it in Base by disabling slots.

How to feel the switch directly

This is the fastest way to internalize the repaint cost. Budget five minutes.

Setup

  • Open a 1-minute chart of a liquid instrument that is currently moving (extended midday or the first hour of a session is ideal).

  • Drop the indicator on. Keep defaults.

  • Make sure On Bar Close? is on.

Step 1 β€” watch slot 03 with the switch on

Slot 03 is the 60-minute slot. With the switch on, slot 03 should only change when a 60-minute bar closes. Between two 60-minute closes, the slot's value on the pane is the value from the previous confirmed 60-minute bar. Watch for at least one 60-minute close and confirm: at the top of the hour, you should see slot 03 step to a new value, and then hold it until the next top of the hour.

Step 2 β€” flip the switch off

Keep the chart where it is. Toggle On Bar Close? off. Now watch slot 03 during the live 60-minute bar. You should see it drift as new 1-minute bars print inside the current hour. The reading is no longer "what the 60-minute closed at an hour ago" but "what the 60-minute would close at if it closed right now."

Step 3 β€” watch the handoff

When the 60-minute bar actually closes, the off-switch value should settle to roughly where the on-switch value would have been β€” confirming that the two are reporting the same underlying quantity, just at different confirmation points. It will not match exactly every time, because the very last intra-bar update and the first confirmed update do not always land on the same bar; but you should see the off-switch reading arrive at a place that is consistent with the on-switch reading coming in one bar later.

Step 4 β€” put it back

Flip On Bar Close? back to on.

You have now observed the cost of the off posture directly: the reading can move while the bar is forming, and it settles only when the bar closes. Whether that cost is acceptable depends entirely on what you are using the pane for. It is not acceptable if you are making irrevocable decisions on a slot that is still mid-bar. It may be acceptable if you know the slot can revise and you treat its read as provisional evidence rather than a confirmed input.

The slot-at-or-above-chart-TF rule

A slot's timeframe cannot be lower than the chart's timeframe. If it is, the script stops and displays an error that names the slot β€” for example, "MACD 01 timeframe cannot be lower than the chart timeframe." This is a hard rail, not a silent coercion.

Practical effects:

  • A 5-minute slot on a 1-minute chart is fine. A 5-minute slot on a 15-minute chart is an error.

  • Moving to a higher chart timeframe can silently break a configuration that used to work. If you flip from a 1-minute chart to a 15-minute chart with the default 5/15/60 slots, the 5-minute slot now fails the rule. You will see the error, and the tool will stop evaluating on the chart until you resolve it.

  • The fastest fix is to raise the offending slot's timeframe to match or exceed the chart. A second option is to return to a lower chart timeframe. A third is to disable the slot that is now invalid.

Chart-timeframe collapse β€” the quiet failure mode

This is the failure mode that does not throw an error, and it is the most common way a multi-timeframe MACD pane stops being a multi-timeframe MACD pane.

What it looks like

You open a 1-hour chart with the default slot configuration (5 / 15 / 60). The 5 and 15 are lower than the chart, so the slot-TF rule raises an error. But suppose you set the slots to 60 / 60 / 60, or to 60 / 120 / 240 while on a 60-minute chart. No error β€” every slot is at or above the chart. But every slot that sits equal to the chart is effectively reading the chart's own cadence, and the three slots compress into something very close to one read.

Why it is still "working"

The tool is honoring its rule. It is not allowed to run a slot below the chart, so when you ask for a configuration that ends up with multiple slots on the chart's own cadence, you get multiple copies of the same read. That is correct behavior for the rule; it is also configuration that has lost its teaching purpose.

How to notice it

Two symptoms.

  • The three slot lines start looking glued to each other. They may not be perfectly identical β€” the length pairs and MA families differ β€” but they will behave far more synchronously than they do on lower chart timeframes.

  • The four-state histogram becomes less informative. With three slots all effectively reading chart-cadence MACD, the blend has nothing to blend across cadences; the histogram becomes a read of one thing sampled three ways.

How to fix it

The fix is a configuration choice, not a knob.

  • Either drop the chart back to a timeframe below the slowest slot, so the slot ladder has headroom.

  • Or widen the slot ladder upward so the chart is still below the slowest slot by a meaningful margin. On a 60-minute chart, a 60 / 240 / 1D ladder is genuinely multi-timeframe; a 60 / 60 / 60 ladder is not.

The pane is not broken in the collapsed state. It is telling you the configuration no longer fits the chart.

ATR is per-slot, not per-chart

Worth naming explicitly because it affects how readers interpret slots on different timeframes. ATR is computed inside each slot's own higher-timeframe request. A 60-minute slot's ATR is 60-minute ATR on the chart instrument. A 5-minute slot's ATR is 5-minute ATR on the same instrument.

Two consequences.

  1. Slots on different timeframes can saturate differently on the same chart. A low-volatility session at the 5-minute cadence can coexist with a trending 60-minute context, and the slots' readings will reflect that divergence because their ATRs reflect it.

  2. The pane's cross-timeframe comparability is exactly what the per-slot ATR enables. A shared chart-level ATR across all slots would re-introduce the scaling problem the pane is built to remove.

How this all connects to the alerts

One crucial subtlety: every alert in this script is gated by barstate.isconfirmed, which means alerts fire only on the close of a chart bar. That gating applies to the chart bar, not to the slot's configured-timeframe bar.

So β€” if you are running On Bar Close? off and the chart is 1 minute while slot 03 is on 60 minutes, a per-slot 03 alert still fires on a confirmed 1-minute chart bar close. But the slot 03 evidence that drove the alert could be intra-bar-evolving inside the live 60-minute bar. The chart-bar gate does not rescue you from the fact that the higher-timeframe evidence behind the alert can still revise before the 60-minute bar closes.

This is why the repaint choice and the alert posture are two different concerns in the same configuration, and why the Alerts page carries its own bar-close paragraph that restates this distinction.

Honest rules of thumb

  • If you cannot name, in one sentence, the workflow reason you flipped On Bar Close? off, you should not have flipped it. On is the default for a reason, and "the pane feels sluggish" is not the reason β€” it is the symptom of the tradeoff you were about to pay for.

  • If a slot is not updating as often as you expect, check whether its configured-timeframe bar has closed since the last update. Slower slots update slower. That is not a bug; it is the whole point of a higher-timeframe read.

  • If you move the chart timeframe, revisit the slot timeframes before you trust the pane again. A configuration that worked on a 1-minute chart may be invalid (runtime error) or meaningless (chart-timeframe collapse) on a 15-minute or 1-hour chart. Changing the chart is not a cosmetic move; it changes what the slot ladder is allowed to say.

  • Per-slot repaint control belongs on the CTX trim. Base is one switch for the whole pane. Building a workaround inside Base β€” disabling slots you did not want to repaint, staring at the chart to catch mid-bar drift β€” produces less information than the ladder move does.

Where to go next

  • Alert wiring, the ten conditions, and the bar-close gating in full β€” Alerts.

  • Named scenarios for the three-slot stack, including how repaint posture interacts with workflow choices β€” Workflows.

  • The trust-boundary page on alignment, pinning, and sensitivity drift β€” Limitations and Trust Boundaries.

  • When a slot refuses to plot, the chart throws a runtime error, or a slot looks frozen β€” Troubleshooting.