SMT Divergence [MTF]## SMT Divergence
**Smart Money Technique (SMT) Divergence** detects structural price divergences between two correlated assets — most commonly NQ (Nasdaq) and ES (S&P 500) futures. When one instrument sweeps a liquidity level (makes a new high or low) while the other fails to confirm, it signals a potential reversal driven by institutional order flow.
This indicator is built for serious intraday and swing traders who apply ICT or Smart Money concepts in their analysis.
---
### How it works
A **Bullish SMT** is detected when:
- The main asset prints a **lower low** compared to its previous swing low
- The comparison asset simultaneously prints a **higher low**
- → NQ swept liquidity, ES did not confirm → reversal to the upside expected
A **Bearish SMT** is detected when:
- The main asset prints a **higher high** compared to its previous swing high
- The comparison asset simultaneously prints a **lower high**
- → NQ swept liquidity, ES did not confirm → reversal to the downside expected
Pivots are confirmed using a **Williams Fractal** approach: N bars on both sides must be lower (for highs) or higher (for lows) before a pivot is accepted. This avoids premature signals on unconfirmed wicks.
---
### Key features
**Multi-Timeframe (MTF)**
Configure up to 3 higher timeframes independently. When you are on a 5-minute chart, 1H and 4H divergences are projected directly onto your chart — correctly anchored to the exact price bars where the pivots occurred. Each timeframe has its own color scheme (dark → medium → light) and line width so you can instantly distinguish timeframe importance at a glance.
**Two Comparison Assets**
Compare the chart instrument against up to two correlated assets simultaneously (default: ES and NQ). Each asset can be enabled or disabled independently.
**Pivot Quality Filters**
- *Candle Direction Validation*: optionally require that a pivot high was formed on a bullish candle and a pivot low on a bearish candle — filtering out weak wicks
- *Minimum Distance Filter*: only accept divergences where the swing size exceeds a configurable threshold, either as a fixed number of points or as a multiple of ATR(14)
**Invalidation Detection**
Once price closes beyond the sweep level (below a bullish SMT low, or above a bearish SMT high), the signal is automatically marked as invalidated. Choose between three modes:
- *Dashed*: lines become dashed and faded
- *Hide*: lines and labels are removed entirely
- *Recolor*: lines are repainted in a configurable color (default: gray)
**Clean visual output**
- Solid main-asset line + faded comparison-asset line per signal
- Configurable line label at the midpoint (e.g. "1H SMT", "4H SMT")
- Optional action label with bias, entry suggestion, and stop-loss level
- No repainting: all pivots are confirmed only on closed bars using `lookahead_off`
---
### Recommended settings
| Timeframe | Pivot Lookback |
|-----------|---------------|
| 5 min | 2–3 |
| 15 min | 3 |
| 1H | 3–4 |
Apply the indicator to your **NQ chart** with ES as Asset A. For ES traders, apply to the ES chart with NQ as Asset A.
---
### Notes
- This indicator does **not** repaint. Signals appear only after both pivot bars are fully confirmed.
- The HTF pivot lines are anchored to the exact chart bar where the high or low occurred, ensuring precise visual alignment across timeframes.
- Built for NQ/ES futures but works with any pair of correlated instruments (e.g. DJI/SPX, BTC/ETH).
อินดิเคเตอร์ Pine Script®






















