OPEN-SOURCE SCRIPT
Aggiornato Grimes KC: MTF Volatility Regimes

### 🌐 Overview
**Grimes KC: MTF Volatility Regimes** is an advanced Multi-Timeframe (MTF) Volatility Regime Mapping System. The indicator is built upon the robust foundation of **Adam Grimes' Keltner Channels (KC)** and synthesized with the multi-layered volatility analysis inspired by **Mark Whistler's Wave PM** and **John Carter's TTM Squeeze**.
This indicator is NOT just a tool that paints colors on your background. It is a high-dimensional market map that seamlessly merges **Statistical Price Extremes (Spatial Dimension)** with **MTF Volatility Cycles (Temporal Dimension)** through a two-step framework.
---
### 🔬 The Two-Step Analytical Framework
#### Step 1: Statistical Price Extremes & Tail Events (Spatial Dimension)
The core structure utilizes a dual-layered MTF Keltner Channel. Statistically, the probability of price simultaneously piercing outside the outer bands of **both the Chart Timeframe and the Higher Timeframe at the exact same time is extremely low (a rare tail event)**.
However, this extreme breakthrough presents **two diametrically opposed possibilities**: it could either be the birth of a massive, explosive **"Band-Walk" (institutional trend initiation)**, or a severe **"Mean-Reversion Snapback" (an overextended statistical anomaly ripe for a fade)**. By plotting these multi-layered price boundaries, the indicator visually maps these high-stakes junctions, allowing traders to monitor which of the two opposite paths the market will choose.
#### Step 2: Quantified Volatility Cycle Serialization (Temporal Dimension)
To eliminate raw price noise, the indicator continuously measures the historical percentile (0–100%) of the band widths over a user-defined lookback period. It dynamically normalizes and serializes the MTF volatility cycle (Contraction & Expansion). The interplay between long-term institutional compression and short-term retail momentum is instantly visualized, telling you whether the market is loading energy, expanding in a healthy trend, or reaching statistical exhaustion.
---
### 🎨 The 4 Volatility Regimes & Actionable Strategies
#### 1. 🟦 Double Squeeze (Both Timeframes <= 10%)
* **Market State:** Severe volatility compression across both short-term retail and long-term institutional participants. The market energy is coiled like a tight spring.
* **Strategy:** **Prepare for Breakout.** Do not trade inside this zone. Wait for the background color to turn off and look for a heavy momentum expansion.
#### 2. 🟨 Early Breakout / Volatility Illusion (Chart TF >= 90% / HTF <= 10%)
* **Market State:** Short-term volatility spikes while the macro timeframe remains in a heavy squeeze. According to **Mark Whistler's theory**, this represents a *"Volatility Illusion"* that lacks true institutional liquidity.
* **Strategy:** **Monitor for Fade or Breakout.** This regime presents **two diametrically opposed scenarios**:
1) **The Fade (Mean-Reversion):** The price expansion fails as a "False Breakout," and the price is rapidly snapped back to the center by the gravity of the HTF squeeze. This offers a high-probability short-term counter-trend entry.
2) **The Lead (Trend Initiation):** The short-term momentum is so powerful that it forces the higher timeframe to break its squeeze, dragging the HTF into an expansion and starting a massive **"Band-Walk"**.
Always wait for price action to confirm which scenario unfolds before execution.
#### 3. 🟪 Pullback / Trend Continuation (Chart TF <= 10% / HTF >= 90%)
* **Market State:** The higher timeframe is in a powerful, established trend, while the lower timeframe chart takes a temporary breath (forming tight ranges, flags, or pennants).
* **Strategy:** **High-Probability Pullback Entry.** This is the ideal regime for trend-followers. Look to buy the dips or sell the rallies when the short-term chart expands back out in the alignment direction of the HTF trend.
#### 4. 🟥 Double Expansion (Both Timeframes >= 90%)
* **Market State:** Statistical exhaustion. Both macro and micro trends have reached their theoretical and statistical upper limit over the lookback history.
* **Strategy:** **Take Profit / Do Not Chase.** The market is severely overextended. Tighten trailing stops or secure your profits immediately. Absolutely avoid chasing new positions here.
---
### ⚠️ Crucial Trading Guide
**IMPORTANT:** This indicator is a Volatility Regime Map, NOT a raw buy/sell signal generator. It provides 1-dimensional volatility structure (width) and multi-timeframe regime contexts.
To achieve a complete institutional execution setup, you must combine these background colors with a directional tool, such as the slope of the Moving Average or price action breakout direction, to filter your trades.
---
### ⚙️ Best Practices & Inputs
* **Timeframe Selection (HTF Input):** It is **highly recommended** to set the Higher Timeframe (HTF) to **1-Hour (60) or higher** (e.g., 240 or D) relative to your lower timeframe charts (like 5-min or 15-min). This allows the algorithm to accurately capture macro institutional cycles.
* **Fully Customizable Visuals:** Unlike rigid scripts, you can customize all 4 regime colors, line colors, and background opacities directly from the Input Parameter settings to seamlessly match your Dark or Light chart themes.
---
*Credits: Conceptualized based on the volatility market microstructures of Adam Grimes and Mark Whistler. Developed with the assistance of an AI coding partner.*
**Grimes KC: MTF Volatility Regimes** is an advanced Multi-Timeframe (MTF) Volatility Regime Mapping System. The indicator is built upon the robust foundation of **Adam Grimes' Keltner Channels (KC)** and synthesized with the multi-layered volatility analysis inspired by **Mark Whistler's Wave PM** and **John Carter's TTM Squeeze**.
This indicator is NOT just a tool that paints colors on your background. It is a high-dimensional market map that seamlessly merges **Statistical Price Extremes (Spatial Dimension)** with **MTF Volatility Cycles (Temporal Dimension)** through a two-step framework.
---
### 🔬 The Two-Step Analytical Framework
#### Step 1: Statistical Price Extremes & Tail Events (Spatial Dimension)
The core structure utilizes a dual-layered MTF Keltner Channel. Statistically, the probability of price simultaneously piercing outside the outer bands of **both the Chart Timeframe and the Higher Timeframe at the exact same time is extremely low (a rare tail event)**.
However, this extreme breakthrough presents **two diametrically opposed possibilities**: it could either be the birth of a massive, explosive **"Band-Walk" (institutional trend initiation)**, or a severe **"Mean-Reversion Snapback" (an overextended statistical anomaly ripe for a fade)**. By plotting these multi-layered price boundaries, the indicator visually maps these high-stakes junctions, allowing traders to monitor which of the two opposite paths the market will choose.
#### Step 2: Quantified Volatility Cycle Serialization (Temporal Dimension)
To eliminate raw price noise, the indicator continuously measures the historical percentile (0–100%) of the band widths over a user-defined lookback period. It dynamically normalizes and serializes the MTF volatility cycle (Contraction & Expansion). The interplay between long-term institutional compression and short-term retail momentum is instantly visualized, telling you whether the market is loading energy, expanding in a healthy trend, or reaching statistical exhaustion.
---
### 🎨 The 4 Volatility Regimes & Actionable Strategies
#### 1. 🟦 Double Squeeze (Both Timeframes <= 10%)
* **Market State:** Severe volatility compression across both short-term retail and long-term institutional participants. The market energy is coiled like a tight spring.
* **Strategy:** **Prepare for Breakout.** Do not trade inside this zone. Wait for the background color to turn off and look for a heavy momentum expansion.
#### 2. 🟨 Early Breakout / Volatility Illusion (Chart TF >= 90% / HTF <= 10%)
* **Market State:** Short-term volatility spikes while the macro timeframe remains in a heavy squeeze. According to **Mark Whistler's theory**, this represents a *"Volatility Illusion"* that lacks true institutional liquidity.
* **Strategy:** **Monitor for Fade or Breakout.** This regime presents **two diametrically opposed scenarios**:
1) **The Fade (Mean-Reversion):** The price expansion fails as a "False Breakout," and the price is rapidly snapped back to the center by the gravity of the HTF squeeze. This offers a high-probability short-term counter-trend entry.
2) **The Lead (Trend Initiation):** The short-term momentum is so powerful that it forces the higher timeframe to break its squeeze, dragging the HTF into an expansion and starting a massive **"Band-Walk"**.
Always wait for price action to confirm which scenario unfolds before execution.
#### 3. 🟪 Pullback / Trend Continuation (Chart TF <= 10% / HTF >= 90%)
* **Market State:** The higher timeframe is in a powerful, established trend, while the lower timeframe chart takes a temporary breath (forming tight ranges, flags, or pennants).
* **Strategy:** **High-Probability Pullback Entry.** This is the ideal regime for trend-followers. Look to buy the dips or sell the rallies when the short-term chart expands back out in the alignment direction of the HTF trend.
#### 4. 🟥 Double Expansion (Both Timeframes >= 90%)
* **Market State:** Statistical exhaustion. Both macro and micro trends have reached their theoretical and statistical upper limit over the lookback history.
* **Strategy:** **Take Profit / Do Not Chase.** The market is severely overextended. Tighten trailing stops or secure your profits immediately. Absolutely avoid chasing new positions here.
---
### ⚠️ Crucial Trading Guide
**IMPORTANT:** This indicator is a Volatility Regime Map, NOT a raw buy/sell signal generator. It provides 1-dimensional volatility structure (width) and multi-timeframe regime contexts.
To achieve a complete institutional execution setup, you must combine these background colors with a directional tool, such as the slope of the Moving Average or price action breakout direction, to filter your trades.
---
### ⚙️ Best Practices & Inputs
* **Timeframe Selection (HTF Input):** It is **highly recommended** to set the Higher Timeframe (HTF) to **1-Hour (60) or higher** (e.g., 240 or D) relative to your lower timeframe charts (like 5-min or 15-min). This allows the algorithm to accurately capture macro institutional cycles.
* **Fully Customizable Visuals:** Unlike rigid scripts, you can customize all 4 regime colors, line colors, and background opacities directly from the Input Parameter settings to seamlessly match your Dark or Light chart themes.
---
*Credits: Conceptualized based on the volatility market microstructures of Adam Grimes and Mark Whistler. Developed with the assistance of an AI coding partner.*
Note di rilascio
Fixed BugsScript open-source
Nello spirito di TradingView, l'autore di questo script lo ha reso open source, in modo che i trader possano esaminarne e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricordiamo che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.
Script open-source
Nello spirito di TradingView, l'autore di questo script lo ha reso open source, in modo che i trader possano esaminarne e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricordiamo che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.