OPEN-SOURCE SCRIPT
ADX + VIX / Mean Reversion or Trend

VIX + ADX · Zones — TradingView Description (Open Source)
---
Indicator Title
**VIX + ADX · Mean Reversion & Market Regime**
Short tagline
*Two curves, one reading: know instantly when to fade the market or wait on the sidelines.*
---
Description
---
🧭 What This Indicator Does
This indicator overlays two pieces of information in a single pane:
- The **VIX** (CBOE Volatility Index) — the market's fear gauge, telling you *how much* volatility is priced into options
- The **ADX** (Average Directional Index) — the trend strength meter, telling you *how directional* price action currently is
Together, they define three clearly distinct trading regimes, each calling for a different approach.
---
📊 Reading the Two Curves
#### 🔴🟠🟢 VIX Curve — Fear & Volatility
| Color | VIX Level | What It Means |
|---|---|---|
| 🟢 **Green** | < 20 | Low fear · Options implied vol is cheap · Market makers are neutral · Ideal conditions |
| 🟠 **Orange** | 20 – 30 | Rising fear · RISK OFF mode · Directional pressure building · Reduce exposure |
| 🔴 **Red** | > 30 | Panic · Volatility explosion · Gamma hedging amplifies moves · Survival mode |
Horizontal levels:
- `- - -` Orange dashed at **20** → RISK OFF threshold
- `───` Red solid at **30** → Panic threshold
---
⚪🔵🔴 ADX Curve — Trend Strength
The ADX does **not** tell you whether the market goes up or down. It measures the **intensity** of movement in either direction.
| Color | ADX Level | What It Means |
|---|---|---|
| 🔵 **Blue** | < 20 | No trend · Pure range · Price is mean-reverting around equilibrium |
| ⚪ **White** | 20 – 40 | Trend building or fading · Transitional zone · Watch for direction |
| 🔴 **Red** | > 40 | Very strong trend · Momentum peak · Exhaustion / reversal setup forming |
**Black zone between 20 and 40** — the "Trend band" . When the ADX is inside this band, you are maybe in a trend condition.
🎯 The Two Core Strategies
This indicator is built around **Mean Reversion** in two distinct contexts:
---
Strategy 1 — 📉 Mean Reversion from ADX Peak (ADX > 40)
When the ADX crosses **above 40**, the market has entered an extreme directional move. Historically, a high ADX reading signals **exhaustion**, not continuation. The trend has overextended.
**Setup:**
- ADX curve turns **red** (crosses above 40)
- Watch for the ADX to peak and begin rolling over (the curve starts declining)
- The turning point of the ADX = the moment momentum is dying
- This is your signal to **fade the move** and position for reversion to the mean
**Confirmation with VIX:**
- If VIX is green (< 20): ideal setup, vol is calm, the extension is likely mechanical → strong MR signal
- If VIX is orange (20–30): the move has fear behind it, wait for VIX to start declining before fading
- If VIX is red (> 30): do not fade yet — panic moves can extend far beyond rational levels
**Key rule:** don't fade the ADX on the way up. Wait for the **peak and rollover**. The red curve turning back toward white is your entry window.
---
Strategy 2 — 📐 Mean Reversion in Range (ADX < 20)
When the ADX drops **below 20**, there is no meaningful trend. The market is oscillating around equilibrium. In this regime, **price respects key levels** — options strikes, gamma walls, Max Pain, support/resistance zones.
**Setup:**
- ADX curve turns **blue** (drops below 20)
- The market is in a defined range
- Key technical and options levels act as **price magnets**
- Fade the extremes: sell resistance, buy support, use options structures (credit spreads, iron condors, short straddles)
**Confirmation with VIX:**
- VIX **green** (< 20) + ADX **blue** (< 20) = **perfect alignment** · The cleanest mean-reversion environment possible · Options dealers are neutral · Gamma levels are sticky
- VIX **orange** (20–30) + ADX **blue** (< 20) = range trade still valid but reduce size · Vol is elevated, levels may be tested more aggressively
- VIX **red** (> 30) + ADX **blue** (< 20) = dangerous · Even in a range, a vol spike can trigger a sudden breakdown · Avoid range strategies, wait for VIX to settle
---
🔁 Combined Signal Summary
| VIX | ADX | Regime | Strategy |
|---|---|---|---|
| 🟢 < 20 | 🔵 < 20 | ✅ **Perfect Range** | MR in range · Sell vol · Fade extremes · Trust options levels |
| 🟠 20-30 | 🔵 < 20 | 🟡 **Cautious Range** | Smaller size · Levels still matter but less reliable |
| 🟢 < 20 | ⚪ 20-40 | ⚠️ **Transition** | Wait · Trend trying to form or fade · No clean setup |
| 🟠 20-30 | ⚪ 20-40 | ⚠️ **Risk Off / Trending** | Reduce all exposure · Avoid new entries |
| Any | 🔴 > 40 peak + rolling | 🔄 **MR from Extreme** | Fade the exhaustion · Wait for ADX rollover confirmation |
| 🔴 > 30 | 🔴 > 40 | 🚨 **Panic / Flush** | Stand aside · No fading · Let it resolve |
📝 Important Notes
- The **VIX** is CBOE data (`VIX` symbol on TradingView). Most relevant for US equity-linked instruments: S&P 500, Nasdaq, and correlated assets. For other markets (forex, crypto, commodities), use VIX as a macro filter only.
- The **ADX** is calculated on the **active chart symbol and timeframe**. It adapts to any market.
- This indicator is a **regime filter**, not a signal generator. Use it to confirm or disqualify your existing setups — not to generate entries on its own.
- Recommended timeframes: works on all, but most actionable on **M5 to Daily**. On very short TF (< 5min), ADX is noisier.
🔓 Open Source
Free to use, fork, and improve. Share your improvements with the community.
Created by GuillaumeFly
---
---
Indicator Title
**VIX + ADX · Mean Reversion & Market Regime**
Short tagline
*Two curves, one reading: know instantly when to fade the market or wait on the sidelines.*
---
Description
---
🧭 What This Indicator Does
This indicator overlays two pieces of information in a single pane:
- The **VIX** (CBOE Volatility Index) — the market's fear gauge, telling you *how much* volatility is priced into options
- The **ADX** (Average Directional Index) — the trend strength meter, telling you *how directional* price action currently is
Together, they define three clearly distinct trading regimes, each calling for a different approach.
---
📊 Reading the Two Curves
#### 🔴🟠🟢 VIX Curve — Fear & Volatility
| Color | VIX Level | What It Means |
|---|---|---|
| 🟢 **Green** | < 20 | Low fear · Options implied vol is cheap · Market makers are neutral · Ideal conditions |
| 🟠 **Orange** | 20 – 30 | Rising fear · RISK OFF mode · Directional pressure building · Reduce exposure |
| 🔴 **Red** | > 30 | Panic · Volatility explosion · Gamma hedging amplifies moves · Survival mode |
Horizontal levels:
- `- - -` Orange dashed at **20** → RISK OFF threshold
- `───` Red solid at **30** → Panic threshold
---
⚪🔵🔴 ADX Curve — Trend Strength
The ADX does **not** tell you whether the market goes up or down. It measures the **intensity** of movement in either direction.
| Color | ADX Level | What It Means |
|---|---|---|
| 🔵 **Blue** | < 20 | No trend · Pure range · Price is mean-reverting around equilibrium |
| ⚪ **White** | 20 – 40 | Trend building or fading · Transitional zone · Watch for direction |
| 🔴 **Red** | > 40 | Very strong trend · Momentum peak · Exhaustion / reversal setup forming |
**Black zone between 20 and 40** — the "Trend band" . When the ADX is inside this band, you are maybe in a trend condition.
🎯 The Two Core Strategies
This indicator is built around **Mean Reversion** in two distinct contexts:
---
Strategy 1 — 📉 Mean Reversion from ADX Peak (ADX > 40)
When the ADX crosses **above 40**, the market has entered an extreme directional move. Historically, a high ADX reading signals **exhaustion**, not continuation. The trend has overextended.
**Setup:**
- ADX curve turns **red** (crosses above 40)
- Watch for the ADX to peak and begin rolling over (the curve starts declining)
- The turning point of the ADX = the moment momentum is dying
- This is your signal to **fade the move** and position for reversion to the mean
**Confirmation with VIX:**
- If VIX is green (< 20): ideal setup, vol is calm, the extension is likely mechanical → strong MR signal
- If VIX is orange (20–30): the move has fear behind it, wait for VIX to start declining before fading
- If VIX is red (> 30): do not fade yet — panic moves can extend far beyond rational levels
**Key rule:** don't fade the ADX on the way up. Wait for the **peak and rollover**. The red curve turning back toward white is your entry window.
---
Strategy 2 — 📐 Mean Reversion in Range (ADX < 20)
When the ADX drops **below 20**, there is no meaningful trend. The market is oscillating around equilibrium. In this regime, **price respects key levels** — options strikes, gamma walls, Max Pain, support/resistance zones.
**Setup:**
- ADX curve turns **blue** (drops below 20)
- The market is in a defined range
- Key technical and options levels act as **price magnets**
- Fade the extremes: sell resistance, buy support, use options structures (credit spreads, iron condors, short straddles)
**Confirmation with VIX:**
- VIX **green** (< 20) + ADX **blue** (< 20) = **perfect alignment** · The cleanest mean-reversion environment possible · Options dealers are neutral · Gamma levels are sticky
- VIX **orange** (20–30) + ADX **blue** (< 20) = range trade still valid but reduce size · Vol is elevated, levels may be tested more aggressively
- VIX **red** (> 30) + ADX **blue** (< 20) = dangerous · Even in a range, a vol spike can trigger a sudden breakdown · Avoid range strategies, wait for VIX to settle
---
🔁 Combined Signal Summary
| VIX | ADX | Regime | Strategy |
|---|---|---|---|
| 🟢 < 20 | 🔵 < 20 | ✅ **Perfect Range** | MR in range · Sell vol · Fade extremes · Trust options levels |
| 🟠 20-30 | 🔵 < 20 | 🟡 **Cautious Range** | Smaller size · Levels still matter but less reliable |
| 🟢 < 20 | ⚪ 20-40 | ⚠️ **Transition** | Wait · Trend trying to form or fade · No clean setup |
| 🟠 20-30 | ⚪ 20-40 | ⚠️ **Risk Off / Trending** | Reduce all exposure · Avoid new entries |
| Any | 🔴 > 40 peak + rolling | 🔄 **MR from Extreme** | Fade the exhaustion · Wait for ADX rollover confirmation |
| 🔴 > 30 | 🔴 > 40 | 🚨 **Panic / Flush** | Stand aside · No fading · Let it resolve |
📝 Important Notes
- The **VIX** is CBOE data (`VIX` symbol on TradingView). Most relevant for US equity-linked instruments: S&P 500, Nasdaq, and correlated assets. For other markets (forex, crypto, commodities), use VIX as a macro filter only.
- The **ADX** is calculated on the **active chart symbol and timeframe**. It adapts to any market.
- This indicator is a **regime filter**, not a signal generator. Use it to confirm or disqualify your existing setups — not to generate entries on its own.
- Recommended timeframes: works on all, but most actionable on **M5 to Daily**. On very short TF (< 5min), ADX is noisier.
🔓 Open Source
Free to use, fork, and improve. Share your improvements with the community.
Created by GuillaumeFly
---
Script open-source
Dans l'esprit TradingView, le créateur de ce script l'a rendu open source afin que les traders puissent examiner et vérifier ses fonctionnalités. Bravo à l'auteur! Bien que vous puissiez l'utiliser gratuitement, n'oubliez pas que la republication du code est soumise à nos Règles.
Clause de non-responsabilité
Les informations et publications ne sont pas destinées à être, et ne constituent pas, des conseils ou recommandations financiers, d'investissement, de trading ou autres fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.
Script open-source
Dans l'esprit TradingView, le créateur de ce script l'a rendu open source afin que les traders puissent examiner et vérifier ses fonctionnalités. Bravo à l'auteur! Bien que vous puissiez l'utiliser gratuitement, n'oubliez pas que la republication du code est soumise à nos Règles.
Clause de non-responsabilité
Les informations et publications ne sont pas destinées à être, et ne constituent pas, des conseils ou recommandations financiers, d'investissement, de trading ou autres fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.