# Divergence Variants & Confirmation

Divergence Variants & Confirmation is an indicator on [Vela](https://vela.luxalgo.com/chart), our next-generation charting platform, written in Pine Script®.

Detects regular, hidden, and exaggerated divergences on RSI, Stochastic %K, MACD, or Rate of Change, then tracks each through a pending-to-confirmed-or-failed state machine: structure-break confirmation by default with a 30-bar window. Variant labels, multiple-divergence chains, and a confirm-rate dashboard keep the grading honest.

- Indicator in the LuxAlgo Library, by LuxAlgo, published Jun 19, 2026.
- Access: free.
- Concepts: [Divergence Variants & Confirmation](https://www.luxalgo.com/library/concept/divergence-variants-and-confirmation/) (primary)
- Open on Vela: https://vela.luxalgo.com/chart?pineScriptCodeId=a262jy8f0v3i3ztnk1jo6809
- Page: https://www.luxalgo.com/library/indicator/divergence-variants-and-confirmation/

**Divergence Variants & Confirmation** detects regular, hidden, and exaggerated divergences on four selectable oscillators and refuses to call any a signal until price confirms. Each pattern from the [divergence variant taxonomy](https://www.luxalgo.com/library/concept/divergence-variants-and-confirmation/) goes pending with lines on price and oscillator, then confirms (a structure break by default) or fails; a dashboard tallies the confirm rate.

## How to Trade the Divergence Variants & Confirmation?

- **R / H / E tags**: variant codes at the confirming swing: regular (new price extreme, fading oscillator), hidden (shallower price extreme, stronger oscillator), exaggerated (roughly equal extremes).
- **✓ on a filled label**: the confirmation rule fired. The divergence bias is now actionable.
- **×3 and beyond**: chains running three or more swings deep tag as multiple divergence; confirmation does not relax.
- **Zone dot**: printed from overbought/oversold, the classic location grade among the library's [momentum tools](https://www.luxalgo.com/library/family/momentum/); bounded oscillators only.

## Divergence Variants & Confirmation Settings

- **Oscillator** (default RSI), **Source** (default close), **Length** (default 14); **Stochastic Smoothing** (default 3) and **MACD Fast** / **Slow** / **Signal** (defaults 12 / 26 / 9).
- **Overbought** / **Oversold** (defaults 70 / 30): zone levels for the bounded oscillators.
- **Left Bars** / **Right Bars** (defaults 5 / 5): swing confirmation; the right side sets the lag.
- **Max Bars Between Swings** (default 60): swings further apart are not compared.
- **Equal-Extreme Tolerance** (default 0.25): ATR multiples separating new, equal, and weaker extremes.
- **Regular**, **Hidden**, **Exaggerated** (all enabled): classes to track.
- **Confirmation Rule** (default Structure Break) and **Confirmation Window** (default 30): the confirming event and the allowed bars.
- **Variant Dashboard** (default enabled); Style toggles govern the drawings.

## Frequently Asked Questions

### How do regular and hidden divergence differ?

Regular sets a fresh price extreme against a fading oscillator and warns of exhaustion; [Hidden Divergence](https://www.luxalgo.com/library/indicator/hidden-divergence/) inverts the geometry (a shallower price extreme against a stronger oscillator) and argues for continuation.

### Why do labels appear bars after the swing?

A swing only exists once Right Bars have printed beyond it, so nothing is classified until both swings are final. Signals drawn at the extreme rest on unconfirmed pivots; this build accepts the lag and does not repaint.

### What makes a pattern fail?

Invalidation (fresh price and oscillator extremes re-synchronizing the pair) or expiry of the confirmation window. Failed patterns fade and count toward the confirm rate.

## Related indicators

- [Oscillator Matrix](https://www.luxalgo.com/library/indicator/luxalgo-oscillator-matrix/) (Regular Bullish/bearish Divergence): markdown at https://www.luxalgo.com/library/indicator/luxalgo-oscillator-matrix.md
- [RSI Divergence: Out-of-Sample Optimizer](https://www.luxalgo.com/library/indicator/rsi-divergence-out-of-sample-optimizer/) (Regular Bullish/bearish Divergence): markdown at https://www.luxalgo.com/library/indicator/rsi-divergence-out-of-sample-optimizer.md
- [HTF Reversal Divergences](https://www.luxalgo.com/library/indicator/htf-reversal-divergences/) (Regular Bullish/bearish Divergence): markdown at https://www.luxalgo.com/library/indicator/htf-reversal-divergences.md
- [Hidden Divergence](https://www.luxalgo.com/library/indicator/hidden-divergence/) (Momentum & Oscillators): markdown at https://www.luxalgo.com/library/indicator/hidden-divergence.md
- [LuxAlgo - Screener (OSC)](https://www.luxalgo.com/library/indicator/luxalgo-screener-osc/) (Regular Bullish/bearish Divergence): markdown at https://www.luxalgo.com/library/indicator/luxalgo-screener-osc.md
- [RSI Candlestick Oscillator](https://www.luxalgo.com/library/indicator/rsi-candlestick-oscillator/) (Overbought/oversold): markdown at https://www.luxalgo.com/library/indicator/rsi-candlestick-oscillator.md
- [Adaptive Bounds RSI](https://www.luxalgo.com/library/indicator/adaptive-bounds-rsi/) (Overbought/oversold): markdown at https://www.luxalgo.com/library/indicator/adaptive-bounds-rsi.md
- [Momentum Expansion vs Contraction](https://www.luxalgo.com/library/indicator/momentum-expansion-vs-contraction/) (Momentum & Oscillators): markdown at https://www.luxalgo.com/library/indicator/momentum-expansion-vs-contraction.md

---

Source: https://www.luxalgo.com/library/indicator/divergence-variants-and-confirmation/ (LuxAlgo Library). Free to use with attribution: https://www.luxalgo.com/library/license/
