OPEN-SOURCE SCRIPT
Mis à jour MACD-v Divergence Table (MTF)

Scans for MACD-v bullish and bearish divergences across multiple timeframes simultaneously and displays the results in a compact on-chart table — no need to flip between charts.
Includes on-chart plotting identical to a standalone MACD-v divergence indicator: setup dots, trigger dots, background shading, and alerts all run on your chart’s timeframe.
█ HOW IT WORKS
The indicator uses volatility-normalized MACD (MACD-v), which divides the MACD line by ATR to produce a standardized oscillator. Divergence detection follows a two-phase process:
1 — Setup: MACD-v reaches an extreme zone (above +150 for bearish, below -150 for bullish).
2 — Zone Exit: MACD-v pulls back out of the extreme zone.
3 — Trigger: On the next signal crossover, if price made a new extreme but MACD-v did not (divergence), the signal fires.
4 — Exit: The signal stays active until the color state flips to the opposite direction outside the chop zone.
Strict invalidation is enabled by default — if MACD-v crosses the invalidation level in the wrong direction, the setup is cancelled.
█ ON-CHART SIGNALS
🔵 Blue dot (below bar) — Bullish setup. MACD-v hit extreme oversold.
🟢 Green dot (below bar) — Bullish trigger. Divergence confirmed, long entry.
🟡 Yellow dot (above bar) — Bearish setup. MACD-v hit extreme overbought.
🔴 Red dot (above bar) — Bearish trigger. Divergence confirmed, short entry.
Background shading turns green during an active bullish signal and red during an active bearish signal.
█ TABLE COLUMNS
TF — Timeframe
Div — Current divergence state
MACD-v — Current value, color-coded by zone
█ DIVERGENCE STATES
BULL (green) — Bullish divergence triggered
BEAR (red) — Bearish divergence triggered
Bull Setup (blue) — Watching for bullish divergence to form
Bear Setup (yellow) — Watching for bearish divergence to form
(gray) — No active divergence
█ MACD-v VALUE COLOR CODING
Red — Extreme overbought (≥150)
Orange — Overbought (≥60)
Teal — Oversold (≤-60)
Green — Extreme oversold (≤-150)
█ BUILT-IN TIMEFRAMES
15 seconds, 1 minute, 2 minute, 3 minute, 5 minute, 15 minute, 1 hour — each with an on/off toggle.
█ CUSTOM TIMEFRAMES
4 additional slots with TradingView’s standard timeframe picker and a custom label field. Set any timeframe you want — 10 minute, 4 hour, daily, weekly, or anything else.
█ SETTINGS
MACD lengths (default 26/52/9)
Signal multiplier (1.5x smoothing during active trades)
All threshold levels are configurable
Table position and text size
Strict invalidation toggle
█ ALERTS
Bull Trigger (Entry) — Bullish divergence confirmed
Bear Trigger (Entry) — Bearish divergence confirmed
Signal Reset/Exit — Active signal has ended
█ NOTES
The 15-second timeframe requires a TradingView Premium plan.
Uses LTF thresholds by default since all built-in timeframes are intraday.
Includes on-chart plotting identical to a standalone MACD-v divergence indicator: setup dots, trigger dots, background shading, and alerts all run on your chart’s timeframe.
█ HOW IT WORKS
The indicator uses volatility-normalized MACD (MACD-v), which divides the MACD line by ATR to produce a standardized oscillator. Divergence detection follows a two-phase process:
1 — Setup: MACD-v reaches an extreme zone (above +150 for bearish, below -150 for bullish).
2 — Zone Exit: MACD-v pulls back out of the extreme zone.
3 — Trigger: On the next signal crossover, if price made a new extreme but MACD-v did not (divergence), the signal fires.
4 — Exit: The signal stays active until the color state flips to the opposite direction outside the chop zone.
Strict invalidation is enabled by default — if MACD-v crosses the invalidation level in the wrong direction, the setup is cancelled.
█ ON-CHART SIGNALS
🔵 Blue dot (below bar) — Bullish setup. MACD-v hit extreme oversold.
🟢 Green dot (below bar) — Bullish trigger. Divergence confirmed, long entry.
🟡 Yellow dot (above bar) — Bearish setup. MACD-v hit extreme overbought.
🔴 Red dot (above bar) — Bearish trigger. Divergence confirmed, short entry.
Background shading turns green during an active bullish signal and red during an active bearish signal.
█ TABLE COLUMNS
TF — Timeframe
Div — Current divergence state
MACD-v — Current value, color-coded by zone
█ DIVERGENCE STATES
BULL (green) — Bullish divergence triggered
BEAR (red) — Bearish divergence triggered
Bull Setup (blue) — Watching for bullish divergence to form
Bear Setup (yellow) — Watching for bearish divergence to form
(gray) — No active divergence
█ MACD-v VALUE COLOR CODING
Red — Extreme overbought (≥150)
Orange — Overbought (≥60)
Teal — Oversold (≤-60)
Green — Extreme oversold (≤-150)
█ BUILT-IN TIMEFRAMES
15 seconds, 1 minute, 2 minute, 3 minute, 5 minute, 15 minute, 1 hour — each with an on/off toggle.
█ CUSTOM TIMEFRAMES
4 additional slots with TradingView’s standard timeframe picker and a custom label field. Set any timeframe you want — 10 minute, 4 hour, daily, weekly, or anything else.
█ SETTINGS
MACD lengths (default 26/52/9)
Signal multiplier (1.5x smoothing during active trades)
All threshold levels are configurable
Table position and text size
Strict invalidation toggle
█ ALERTS
Bull Trigger (Entry) — Bullish divergence confirmed
Bear Trigger (Entry) — Bearish divergence confirmed
Signal Reset/Exit — Active signal has ended
█ NOTES
The 15-second timeframe requires a TradingView Premium plan.
Uses LTF thresholds by default since all built-in timeframes are intraday.
Notes de version
Here's a TradingView description for the MACD-v Divergence Table indicator:
---
**MACD-v Divergence Table (MTF)**
A multi-timeframe dashboard that scans for MACD-v bullish and bearish divergences across 6 timeframes simultaneously: 15s, 1m, 2m, 3m, 15m, and 1h.
**What it does:**
This indicator runs the full MACD-v divergence detection engine on each timeframe independently, then displays the results in a compact on-chart table. At a glance, you can see which timeframes have active divergence setups or triggered signals — no need to flip between charts.
**Table columns:**
- **TF** — Timeframe
- **Div** — Current divergence state
- **MACD-v** — Current MACD-v value, color-coded by zone
**Divergence states:**
- **BULL** (green) — Bullish divergence triggered. Price made a lower low while MACD-v made a higher low from extreme oversold territory.
- **BEAR** (red) — Bearish divergence triggered. Price made a higher high while MACD-v made a lower high from extreme overbought territory.
- **Bull Setup** (blue) — MACD-v hit extreme oversold (<-150). Watching for a bullish divergence to form.
- **Bear Setup** (yellow) — MACD-v hit extreme overbought (>150). Watching for a bearish divergence to form.
- **-** (gray) — No active divergence.
**How divergence detection works:**
1. **Setup phase:** MACD-v reaches an extreme zone (above +150 for bearish, below -150 for bullish).
2. **Zone exit:** MACD-v pulls back out of the extreme zone.
3. **Trigger:** On the next crossover/crossunder, if price made a new extreme but MACD-v did not (divergence), the signal fires.
4. **Exit:** The signal stays active until the color state flips to the opposite direction outside the chop zone.
Strict invalidation is on by default — if MACD-v crosses the invalidation level (+/-50) in the wrong direction, the setup is cancelled. This prevents stale setups from producing false signals.
**MACD-v value color coding:**
- Red background — Extreme overbought (>=150)
- Orange background — Overbought (>=60)
- Teal background — Oversold (<=-60)
- Green background — Extreme oversold (<=-150)
**Settings:**
- MACD lengths (default 26/52/9) and signal multiplier (1.5x smoothing during active trades)
- All threshold levels are configurable
- Table position and text size
**Notes:**
- The 15-second timeframe requires a TradingView Premium plan.
- Uses LTF (low timeframe) thresholds by default since all monitored timeframes are intraday.
- Based on the MACD-v (volatility-normalized MACD) which divides the MACD line by ATR to produce a standardized oscillator.
Notes de version
A comprehensive multi-timeframe dashboard that detects MACD-v divergences, checks whether they occurred after sweeping key session levels, and confirms with SMT (Smart Money Technique) divergence against a correlated instrument.Three layers of confluence produce a conviction-ranked signal system — from basic divergence setups to triple-confirmed entries.
█ SIGNAL TIERS
The indicator uses three shapes to show conviction level at a glance:
Circle — Standard MACD-v divergence (setup or trigger)
Diamond — Divergence fired after sweeping a session level during that MACD run
Cross — Divergence + Sweep + SMT divergence (triple confirmation, highest conviction)
Colors always indicate signal type:
Blue/Yellow = Setup (initial extreme reached)
Green/Red = Trigger (divergence confirmed)
Text labels show which level was swept: A-H (Asia High), L-L (London Low), NY-H (NY High), Y-L (Yesterday Low), HOD, LOD.
█ HOW IT WORKS
MACD-v Divergence Detection
Uses volatility-normalized MACD (MACD divided by ATR) to produce a standardized oscillator. Divergence is detected in two phases:
Setup: MACD-v reaches an extreme zone (above +150 for bearish, below -150 for bullish)
Trigger: On the next crossover, price made a new extreme but MACD-v did not (divergence confirmed)
Runs independently on each timeframe via request.security.
Session Level Sweep Detection
At the start of each MACD run (cross above or below signal), the indicator snapshots all session levels. When a signal fires at the end of the run, it checks whether the run’s peak or trough exceeded any of those pre-existing levels. This ensures the sweep happened during that specific move, not from earlier price action.
A swept level is consumed after one use and only resets when that session starts again, preventing the same level from being claimed by multiple signals.
Levels tracked: Asia High/Low, London High/Low, NY High/Low, Yesterday High/Low, HOD/LOD.
SMT Divergence
Compares against a correlated instrument (auto-detected: NQ vs ES, GC vs SI, YM vs ES, CL vs BZ). If this symbol sweeps a session level but the comparison symbol does not, that divergence between the two instruments confirms smart money activity.
SMT fires in both directions — whether this symbol swept and the other did not, or the other swept and this did not. The disagreement is the signal.
█ MULTI-TIMEFRAME TABLE
Displays divergence status across up to 11 timeframes simultaneously:
TF — Timeframe label
Div — Current divergence state (BULL, BEAR, Bull Setup, Bear Setup, or -)
MACD-v — Current value
Sw — Which session level was swept by the last signal
Built-in timeframes: 15s, 1m, 2m, 3m, 5m, 15m, 1h (each toggleable).
4 custom timeframe slots with label input.
█ SESSION LEVEL OVERLAY
Toggle “Show Session Levels on Chart” to plot the actual levels the sweep logic uses. Brighter lines are highs, dimmer lines are lows.
Orange — Asia session
Purple — London session
Aqua — NY session
Gray — Yesterday
A legend table appears in the bottom-left corner.
█ SETTINGS
MACD-v: Fast/Slow/Signal lengths (26/52/9), signal multiplier (1.5x during active trades)
Thresholds: All zone levels configurable (extreme OB/OS, OB/OS, invalidation, chop)
Sweep Levels: Toggle each level individually (Asia H/L, London H/L, NY H/L, Yesterday H/L, HOD/LOD)
Session Times: All in ET, configurable (defaults: Asia 18-03, London 03-09, NY 09-16)
SMT: Auto-detects comparison pair, or set manually. Toggle on/off.
Timeframes: Toggle each built-in TF, plus 4 custom slots with labels.
█ ALERTS
Bull/Bear Trigger (Entry)
Bull/Bear Trigger + Sweep
Bull/Bear Triple (Divergence + Sweep + SMT) — highest conviction
Signal Reset/Exit
█ NOTES
The 15-second timeframe requires TradingView Premium.
SMT comparison uses one additional request.security call (13 total, well within the 40 limit).
Session levels reset only when their specific session restarts, not at midnight.
Based on the MACD-v oscillator (Volatility-Normalized MACD).
Notes de version
MACD-v Divergence + Sweep + SMT (MTF)A conviction-ranked signal system that layers three independent confirmations: MACD-v divergence, session level sweeps, and Smart Money Technique (SMT) divergence against a correlated instrument.
🔷 THREE TIERS OF CONVICTION
Every signal appears on chart as one of three shapes:
● Circle — MACD-v divergence only
◆ Diamond — Divergence + session level sweep
✚ Cross — Divergence + sweep + SMT divergence (triple confirmation)
Colors indicate signal type:
Blue = Bullish setup | Yellow = Bearish setup
Green = Bullish trigger (entry) | Red = Bearish trigger (entry)
Text labels identify which level was swept:
A-H / A-L = Asia High/Low
L-H / L-L = London High/Low
NY-H / NY-L = New York High/Low
Y-H / Y-L = Yesterday High/Low
HOD / LOD = High/Low of Day
🔷 LAYER 1: MACD-v DIVERGENCE
MACD-v normalizes the traditional MACD by ATR, creating a standardized oscillator that works consistently across instruments and volatility regimes. Values above +150 are extreme overbought; below -150 are extreme oversold.
Two-phase detection:
Setup — MACD-v reaches an extreme zone and crosses back (blue/yellow dot)
Trigger — Price makes a new extreme but MACD-v makes a weaker one (the divergence), confirmed by a signal line cross (green/red dot)
Includes dynamic signal smoothing (1.5x EMA during active trades) and strict invalidation to cancel stale setups.
🔷 LAYER 2: SESSION LEVEL SWEEP
A “sweep” means price took out a key liquidity level — grabbing stop orders above a high or below a low — then reversed. Core ICT concept.
How it works:
• When a MACD run begins (signal cross), all session levels are snapshotted
• The run’s peak or trough is tracked
• At signal fire, the indicator checks: did the peak/trough exceed a level that existed BEFORE this run started?
• If yes — that level was swept during this specific move
Once a level is swept by a signal, it is consumed. The same Asia Low cannot be claimed by two different signals. Consumed levels reset only when their session restarts.
Session levels tracked:
• Asia High/Low (18:00–03:00 ET)
• London High/Low (03:00–09:00 ET)
• New York High/Low (09:00–16:00 ET)
• Yesterday High/Low
• HOD/LOD (snapshot at MACD run start)
All times configurable. Each level individually toggleable.
🔷 LAYER 3: SMT DIVERGENCE
SMT divergence = two correlated instruments disagree on whether a key level was swept.
Example: NQ sweeps Asia High but ES does not. This divergence reveals institutional intent — smart money used one instrument to grab liquidity while the other showed their true hand.
Auto-detected pairs:
NQ ↔ ES | GC ↔ SI | YM ↔ ES | RTY ↔ ES | CL ↔ BZ
Or set any comparison symbol manually.
Fires in both directions:
• This symbol swept, comparison did not
• Comparison swept, this symbol did not
Either way — the instruments diverged. That is the signal.
When all three layers align, the signal appears as a ✚ cross with “SMT” in the label. Highest conviction.
🔷 MULTI-TIMEFRAME TABLE
Scans divergence status across up to 11 timeframes:
TF — Timeframe
Div — BULL, BEAR, Bull Setup, Bear Setup, or —
MACD-v — Current value
Sw — Which level was swept (clears when signal exits)
Built-in: 15s, 1m, 2m, 3m, 5m, 15m, 1h (each toggleable)
Plus 4 custom timeframe slots.
🔷 SESSION LEVEL OVERLAY
Toggle “Show Session Levels on Chart” to see the exact levels used by sweep detection:
Orange = Asia | Purple = London | Aqua = NY | Gray = Yesterday
Bright = High | Dim = Low
Color legend in bottom-right corner.
🔷 ALERTS
• Bull/Bear Trigger — divergence confirmed
• Bull/Bear Trigger + Sweep — divergence after sweeping a session level
• Bull/Bear Triple (Div + Sweep + SMT) — highest conviction
• Signal Reset/Exit — active signal ended
🔷 NOTES
• 15-second timeframe requires TradingView Premium
• Based on MACD-v (MACD ÷ ATR) for cross-instrument consistency
• Session levels reset when their session restarts, not at midnight
• 13 request.security calls (within TradingView’s 40 limit)
Notes de version
Update: no hard signal can fire while overbought or oversoldNotes de version
removed oB/oS filters for triggerScript 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.