MTF and Repainting
This page explains how the indicator retrieves higher-timeframe data, what the On Bar Close toggle does per slot, what repainting means in concrete terms, and how to verify the behavior yourself on a live chart. If yo...
Written By Axiom Admin
Last updated About 1 month ago
MTF and Repainting
This page explains how the indicator retrieves higher-timeframe data, what the On Bar Close toggle does per slot, what repainting means in concrete terms, and how to verify the behavior yourself on a live chart. If you use any slot at a timeframe higher than the chart, this page matters.
Why this page exists
Multi-timeframe indicators are easy to build wrong. The most common failure mode: the indicator requests data from a higher-timeframe bar that has not closed yet, uses that unconfirmed data to produce a reading, and then silently revises the reading when the bar finally confirms. The chart looks stable in hindsight because it only shows the final confirmed value. The intrabar readings the trader actually saw β and maybe acted on β are gone.
This is called repainting. It is not always a defect. Sometimes a trader wants the freshest available data and is willing to accept that it will change when the bar closes. What makes repainting dangerous is when it happens invisibly β when the trader does not know the data is provisional and treats it as confirmed.
Axiom MACD Osc Pro makes the repaint tradeoff explicit and gives you per-slot control over it. This page teaches what that control means and how to use it.
How the indicator retrieves higher-timeframe data
When a slot's timeframe is set to a value higher than the chart timeframe, the indicator uses TradingView's request.security() function to fetch data from that higher timeframe. This is the standard mechanism for MTF indicators on TradingView.
The critical question is: which bar does it fetch?
On Bar Close = ON (default)
When On Bar Close is on, the indicator fetches the last fully confirmed higher-timeframe bar. In technical terms, it uses the request.security() function with a one-bar lookback offset that ensures the returned data comes from the previous HTF bar β the one whose values are final.
What this means in practice: While a higher-timeframe bar is building (say, a 1-hour bar that is 35 minutes into its formation), the slot's reading holds steady at the value from the last completed 1-hour bar. It does not update. It does not flicker. When the current 1-hour bar finally closes and a new one begins, the reading updates to reflect the newly completed bar.
The tradeoff: The reading is always one HTF bar "behind" the live market. If you are on a 1-minute chart with a slot at 1H and On Bar Close ON, the slot's reading updates once per hour. For the 59 minutes in between, it shows the state from the last confirmed hourly bar. The data is safe β it will not change β but it is not the freshest possible view.
On Bar Close = OFF
When On Bar Close is off, the indicator fetches the current building higher-timeframe bar. The reading updates on every chart-timeframe bar as the HTF bar develops.
What this means in practice: On a 1-minute chart with a slot at 1H and On Bar Close OFF, the slot's K line updates every minute as the developing hourly bar's MACD changes. The reading is more responsive. It shows you what momentum looks like right now, including data that is not yet final.
The tradeoff: When the hourly bar finally closes, the reading snaps to its confirmed value. This confirmed value may be different from what you saw five minutes ago. If you scroll back through history, the chart shows only the final confirmed values β not the intrabar readings that were visible while the bar was forming. The data you saw and possibly acted on no longer exists in the chart.
This is repainting. The historical chart rewrites itself to show only confirmed data. The intrabar readings are provisional β real in the moment, gone in the record.
Per-slot independence
Each of the ten slots has its own On Bar Close toggle. They are completely independent. You can run:
All slots confirmed (On Bar Close ON for all) β safest, no repaint exposure
All slots unconfirmed (On Bar Close OFF for all) β most responsive, full repaint exposure on every slot
Any mix β some slots confirmed, some unconfirmed
This independence is a design choice. Different timeframes may warrant different tradeoffs. You might want your primary trading timeframe slot confirmed (because you are making decisions based on it) while keeping a fast-reference slot unconfirmed (because you want to see how the current HTF bar is developing even though you know it will change).
How mixed settings affect the blend
If the blend includes both confirmed and unconfirmed slots, the blended output contains a mix of both data types. The blend does not label which portion comes from confirmed data and which comes from unconfirmed data. There is no visual distinction on the chart.
This means: the blended K/D/Histogram inherit the repaint exposure of the least-confirmed contributing slot. If you have five slots on confirmed data and one slot on unconfirmed data, the blend is partially provisional. The severity depends on the unconfirmed slot's weight. A low-weight unconfirmed slot introduces minor contamination. A heavily-weighted unconfirmed slot means the blend is substantially provisional.
The practical question: Does the unconfirmed slot's contribution meaningfully change the blended output? If the slot has weight 10 out of 200 total weight, the contamination is minimal. If it has weight 60 out of 100 total, the blend is majority-unconfirmed.
Why someone would choose unconfirmed data
Turning On Bar Close off is not a mistake the tool should prevent. It is a legitimate choice with legitimate uses:
Discretionary context reading. A trader who watches the chart live and uses the oscillator for general momentum context β not for hard decisions β may prefer the smoother, more current reading that intrabar data provides. They know the reading is provisional. They are not trading the reading; they are using it as one input among many.
Cross-timeframe lead detection. A trader watching a developing HTF bar's momentum may want to see the current direction even though the value is not final. If the developing hourly bar's MACD is trending strongly in one direction, that is useful context β as long as the trader remembers it can change.
Fast-reference secondary slots. A trader running three confirmed primary slots in the blend might add a fourth unconfirmed slot at zero weight to get a "live preview" of a higher timeframe's developing momentum without contaminating the blend. The slot plots but does not influence the blended output.
In all these cases, the key is that the choice is deliberate and the consequences are understood. The trader who turns On Bar Close off for a specific slot and knows that slot's readings are provisional is making a legitimate tradeoff. The trader who turns it off because the oscillator "looks better" and does not realize the history is rewriting itself is in trouble. The difference is awareness, not the setting.
Repaint verification walkthrough
You do not need to trust this explanation. You can see the behavior yourself in under five minutes on a live chart.
Setup
Open any instrument on a 1-minute or 5-minute chart with the indicator loaded.
Enable only one slot (disable the others for clarity). Set that slot to a higher timeframe β 15m or 1H works well.
Set On Bar Close to ON.
Observe confirmed behavior
Watch the slot's K line live for a few minutes. Notice that it does not move between higher-timeframe bar closes. On a 1-minute chart with the slot at 15m, the K line updates every 15 minutes. Between updates, it holds its value.
When the higher-timeframe bar closes, the K line updates to the new confirmed value. This is the only update until the next HTF bar closes.
Switch to unconfirmed behavior
Open the indicator settings. Toggle On Bar Close to OFF for that slot.
Watch the same K line. It now updates on every chart-timeframe bar β every minute on a 1m chart. The line is smoother and more responsive.
Pay attention to what the reading is right now. Note the value.
Wait for the higher-timeframe bar to close. Watch the K line snap to its final confirmed value. The value may be noticeably different from what you saw a few minutes ago.
Scroll back in the chart. Look at the past few higher-timeframe periods. The chart shows only the final confirmed values β not the intrabar readings you just watched change.
What you just saw
With On Bar Close ON: the K line held steady between HTF bar closes and updated cleanly. What you saw is what history shows.
With On Bar Close OFF: the K line updated continuously. What you saw intrabar is gone β history shows only the final values. The readings you watched develop were real in the moment but do not exist in the historical record.
What repainting means for your process
If your process depends on confirmed data
Keep On Bar Close ON for every slot that contributes to decisions. The cost is latency β the reading is one HTF bar behind. The benefit is that every reading you see on the chart is the same reading you would see if you scrolled back a week later. The data is stable. Backtesting against it is valid.
If your process uses intrabar data for context
You can selectively turn On Bar Close OFF on specific slots. Understand the consequences:
Historical analysis is unreliable for that slot. What the chart shows in the past is the final confirmed value, not the intrabar reading that was visible at the time.
Blended output inherits the contamination if the unconfirmed slot has nonzero weight.
Alerts are still chart-bar-close gated. Even with On Bar Close OFF, alerts fire only on confirmed chart-timeframe bars. The alert system does not react to intrabar oscillations, but an alert can still reflect unconfirmed requested-timeframe data if that slot is running with On Bar Close OFF.
If you mix confirmed and unconfirmed slots
Know the weight ratio. If the unconfirmed slot carries 10% of the total blend weight, the contamination is minor. If it carries 50%+, the blended output is substantially provisional.
Consider whether the unconfirmed slot needs to be in the blend at all. If you are using it for visual context, set its weight to zero. It still plots. It still fires alerts. But it does not contaminate the blended reading.
Common questions about MTF behavior
"Does a slot at the chart timeframe repaint?"
Not from higher-timeframe leakage, but On Bar Close still changes the output. When the slot timeframe equals the chart timeframe, the slot still runs through the same request path as every other slot. With On Bar Close = ON, the slot uses the prior confirmed chart bar. With On Bar Close = OFF, it uses the current chart bar.
So a same-timeframe slot is not exposed to unconfirmed higher-timeframe data, but it is also not identical between the two modes. This matters any time you compare the slot against a standard MACD on the chart timeframe or expect the slot to match the live bar one-for-one.
"Does the indicator ever use future data?"
No. With On Bar Close ON, the indicator uses the previous confirmed HTF bar β data that is already finalized. With On Bar Close OFF, the indicator uses the current developing HTF bar β data that exists right now but may change. Neither mode uses data from the future.
The confusion arises because repainting can look like "the indicator knew what was coming." In reality, the indicator was showing provisional data that happened to match the final result in some cases and did not in others. The cases where it matched make it look prescient. The cases where it did not are invisible because the chart has already rewritten.
"Can I backtest with On Bar Close OFF?"
Not reliably, and this is worth understanding fully. TradingView's charts show confirmed historical data. The intrabar values that On Bar Close OFF would have shown at each historical point no longer exist in the data. A backtest on historical data uses the confirmed values β so it effectively runs as if On Bar Close were ON, regardless of the setting.
This creates a subtle trap: the backtest looks clean because the confirmed data is stable, but it does not represent the experience of trading with On Bar Close OFF in real time. In live trading, you would have seen provisional values that shifted on every chart bar, and your actual entries and exits would have been based on readings that no longer exist in the record. The backtest cannot reproduce that experience, so it overstates the clarity and reliability of what the trader would actually see.
"Should I always use On Bar Close ON?"
For any slot whose reading informs a decision you would not want to reverse, yes. On Bar Close ON guarantees that the reading you see will not change after the fact.
On Bar Close OFF has legitimate uses for discretionary context, live monitoring, and fast-reference slots that do not contribute to the blend. The question is not "which is right" but "do I understand the tradeoff for this specific slot."