PROTECTED SOURCE SCRIPT

Multiple Timeframe Overlay - Volatility and Donchian Bands

121
MarketCodex MTF VR + DC + Codex Candles (Free)

This indicator is built as a compact market structure dashboard. It lets you see, on a single chart, how the current timeframe behaves inside a higher-timeframe volatility regime, where the important ranges sit, and when volume is actually doing something meaningful. The free version focuses on a clean, interpretable view rather than endless options, so it is easy to plug into your workflow and start reading structure right away.



Multi-Timeframe Volatility Range (VR)

The core of the tool is the Volatility Range system on two timeframes:
• T1 = current timeframe VR
• T2 = automatically selected higher timeframe VR

Each VR is drawn with a midline (VRM) and two bands, VRL (low band) and VRH (high band).

On your current timeframe (T1), VRM tracks the “heart” of the active move, while VRL and VRH frame the normal volatility envelope around price. The midline is colored in a bull or bear tone depending on the current directional bias, and the bands sit around it as a soft channel. When price stays inside this channel and respects VRM, the move is usually healthy and contained. When price repeatedly pushes outside VRL or VRH, you are dealing with stress, acceleration, or potential exhaustion.

On the higher timeframe (T2), the same logic is applied, but the result is mapped back onto your chart. This gives you a slow, structural volatility regime behind your local candles. T2’s VRM is shown as a higher-timeframe trend line, with VRL and VRH acting as outer bounds that price will often respect even if they sit far away from current bars.

To keep the chart usable, the higher-timeframe bands are only drawn when they extend beyond the current timeframe envelope. In practice, that means T2 only gets loud visually when you are actually interacting with the bigger structure – for example, when the current move is pressing into or beyond the higher-timeframe range. If the chosen chart timeframe does not support a clean T2 mapping, the indicator simply warns you instead of plotting misleading lines.

The result is a clear two-layer volatility map: T1 tells you what is happening here and now, T2 tells you what kind of regime you are operating inside. Alignment between the two usually signals strong trends; compression or constant crossing between them usually signals a more choppy or transitional environment.



Structure Channels (DC) – Current Timeframe

Alongside the VR, the indicator plots a structure channel based on recent price extremes of your current timeframe. It is made of three dotted lines:
• A midline, representing the center of the current range.
• An upper boundary, marking recent local highs.
• A lower boundary, marking recent local lows.

The midline is tinted in bull or bear colors depending on its directional bias, while the outer bands follow the same scheme. These levels give you a clear picture of where the market has actually been trading, as opposed to just where it is trending. When price is coiling inside this channel, you are in range mode. When it breaks and holds above or below, it signals structural expansion, not just a random spike.

This structure layer works very well with the VR system: the VR shows where the move “should” breathe, while the structure channel shows where the market has been repeatedly accepted or rejected.



Higher-Timeframe Structure

The indicator also draws a higher-timeframe structure channel on top of your chart. Conceptually it is the same as the current-timeframe channel – a midline plus high/low boundaries – but computed on the mapped higher timeframe and then overlaid on your active chart.

These lines are drawn slightly thicker and more transparent, so they are visible without taking over the view. They act as “hidden” structure: places where the higher-timeframe market has set meaningful boundaries and where current-timeframe price is likely to react.

When a local move runs straight into a higher-timeframe structure boundary and stalls, you often see pullbacks or reversions. When it slices through and starts using that boundary as support or resistance, you are probably in the middle of a more significant transition. Having both current-TF and higher-TF channels on the same chart makes these shifts much easier to see in real time.



Codex Candles and Volume Pressure

Instead of standard candles, the script can draw Codex Candles, which encode both trend and effort.

Each candle’s base color is tied to the current-timeframe VR direction. When the T1 VR is bullish, bodies and wicks are softly shaded in your bull color; when it is bearish, they switch to your bear color. This means every candle you see is already filtered through the lens of the active volatility regime, not just the open-close relationship.

On top of that, you can enable a volume pressure overlay. The indicator looks at how unusual the current bar’s volume is compared to recent activity and gradually switches the candle body into stronger highlight colors as volume becomes more exceptional. Moderate surges get a softer highlight, stronger bursts get a more intense one, and extreme spikes are clearly marked.

The net effect is a clean “heatmap” on the candles themselves. You can immediately see which pushes carried real participation and which moves were just drifting along with low conviction. For best results, hide the default TradingView candles and let Codex Candles be your primary chart layer.



Event Markers: Crosses and Extremes

The indicator can optionally add event labels whenever the relationship between T1 and T2 becomes interesting. There are two types of events:

The first type marks when the current-timeframe VR midline crosses the higher-timeframe midline. A cross above suggests that the local move is overtaking the larger regime, while a cross below suggests the opposite. On the chart, these appear as clear up or down triangles placed near the VR midline.

The second type marks when the current-timeframe midline moves beyond the higher-timeframe bands themselves – crossing above the upper band or below the lower band. These events highlight situations where local price action is not just trending within the bigger structure, but actively stepping outside it.

Each marker comes with a tooltip text that explains what happened, so you can quickly recall the meaning when you hover over them. They are not meant as mechanical entry signals, but as small, precise alerts that something structurally meaningful has just changed between your two VR layers.



VR Summary Table

In the top-right corner, the indicator displays a summary table for the volatility ranges. It lists the key levels for both T1 and T2:
• The current value of each VR midline (VRM).
• The current lower and upper bands (VRL and VRH).
• A small color cell matching the plot color for each line.

This lets you read exact numbers at a glance without hunting around the chart. It is useful when you want to know the precise value of a band, measure distance from current price to a regime boundary, or quickly compare the relative position of T1 and T2.



How to Use It in Your Workflow

A practical way to use this indicator is to start with the big picture and then zoom into details.

Begin by checking how T1 and T2 VR are aligned. If both midlines point in the same direction and price is moving cleanly inside their combined envelopes, you are in a directional environment where trend-following ideas make more sense. If the midlines constantly cross each other or the range becomes tight and overlapping, you are likely dealing with a more rotational or choppy phase.

Then look at where price sits relative to the structure channels. Current-timeframe structure tells you where intraday or swing ranges are forming; higher-timeframe structure tells you where the market has set bigger boundaries. Moves that begin near a confluence of a structure boundary and a VR band tend to matter more than random swings in the middle of nowhere.

Finally, use Codex Candles and event markers to time attention. Strongly highlighted candles at or near important VR/structure levels suggest genuine effort from market participants. Cross events between T1 and T2 midlines, or pushes beyond higher-timeframe bands, flag potential regime shifts. You can use these as confirmation or caution points around your own setups.

The free version is intentionally focused: two volatility ranges, two structure layers, enriched candles, a small event system, and a concise table. Together they create a coherent view of multi-timeframe trend, range, and effort, without giving away how anything is computed under the hood.

คำจำกัดสิทธิ์ความรับผิดชอบ

ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน