> For the complete documentation index, see [llms.txt](https://docs.bigbeluga.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.bigbeluga.com/ultimate-suites/ultimate-rsi-suite/rsi-divergence.md).

# RSI Divergence

The RSI Divergence module detects when **price and momentum move in opposite directions**, revealing hidden shifts in market strength before trend reversals occur.

<figure><img src="https://3353728891-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1dlOGDREop4WMfLcctYT%2Fuploads%2Fcn9OiZ1WkKwRA0PlY2c6%2Fimage.png?alt=media&amp;token=92897736-6090-4936-a0b2-e8333359f964" alt=""><figcaption></figcaption></figure>

This feature helps traders spot potential turning points that are often invisible in raw price action, making it a key element of the Ultimate RSI Suite.

##

## Divergence

The indicator continuously compares swing highs and lows on RSI against swing highs and lows on price within a defined lookback range.

* **Regular Bullish Divergence:**\
  Price makes a lower low, while RSI forms a higher low.\
  This signals weakening bearish momentum and a potential reversal upward.
* **Regular Bearish Divergence:**\
  Price makes a higher high, while RSI forms a lower high.\
  This signals fading bullish strength and a possible reversal downward.

<figure><img src="https://3353728891-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1dlOGDREop4WMfLcctYT%2Fuploads%2FQoKYvwxiLBSbAOSPOE4I%2Fimage.png?alt=media&amp;token=d655eb99-3fb1-413d-95c1-76f3111cee4c" alt=""><figcaption></figcaption></figure>

Each divergence is confirmed only when both RSI and price structure complete their swings, ensuring reliable signals rather than premature markings.

<div align="left" data-with-frame="true"><figure><img src="https://3353728891-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1dlOGDREop4WMfLcctYT%2Fuploads%2FOKE69XPemzb9SmFvsHRm%2Fimage.png?alt=media&amp;token=ffb1926f-ff8f-422e-b92c-6e4e26d6fe54" alt=""><figcaption></figcaption></figure></div>

{% hint style="info" %}
Controlled by the “Divergence Length” setting (default: 10).\
This defines how many bars the algorithm scans for relevant swing points.
{% endhint %}

##

## Deviation Tracking (+1 / +2)

When enabled, **Deviation Mode** adds dynamic follow-through tracking to each divergence.\
It projects two Volatility-based levels labeled **+1** and **+2** from the signal candle to monitor how the market reacts after divergence confirmation.

* **+1 Cross:** Indicates initial continuation strength.
* **+2 Cross:** Signals strong confirmation that the reversal is developing.

<figure><img src="https://3353728891-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1dlOGDREop4WMfLcctYT%2Fuploads%2FkhJDbtlNEkA2tZjczIdT%2Fimage.png?alt=media&amp;token=09cc9af1-9135-477b-9e0e-59e6ce85b94a" alt=""><figcaption></figcaption></figure>

Each level changes to a dashed style once price touches it, providing clear visual feedback that the deviation has completed.

<div align="left" data-with-frame="true"><figure><img src="https://3353728891-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1dlOGDREop4WMfLcctYT%2Fuploads%2FVAOi5h6m5bGNgNJBZyyf%2Fimage.png?alt=media&amp;token=9042b0d1-1773-451f-86da-ee48baf22bbe" alt=""><figcaption></figcaption></figure></div>

This feature turns divergence detection into a fully interactive confirmation framework, not just static labeling.

##

## Hidden Divergence

While regular divergence signals a potential trend reversal, hidden divergence suggests that the current trend is strong and likely to continue.

* Hidden Bullish Divergence: Price makes a higher low, while RSI forms a lower low. This indicates that despite the dip in momentum, the buyers are still holding a higher floor, suggesting the uptrend will continue.
* Hidden Bearish Divergence: Price makes a lower high, while RSI forms a higher high. This indicates that even though momentum spiked, the price couldn't break the previous ceiling, suggesting the downtrend will continue.

<div><figure><img src="https://3353728891-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1dlOGDREop4WMfLcctYT%2Fuploads%2FusMLOsETRJjitocyJZKp%2Fimage.png?alt=media&amp;token=342a8471-73a8-446d-8112-36770ad592cc" alt=""><figcaption><p>Bearish Hidden Divergence</p></figcaption></figure> <figure><img src="https://3353728891-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1dlOGDREop4WMfLcctYT%2Fuploads%2FGLicqh8atJ6Hf4YBYe1I%2Fimage.png?alt=media&amp;token=33cb91c1-a3aa-4287-bebf-5a5d29fb6fd1" alt=""><figcaption><p>Bullish Hidden Divergence</p></figcaption></figure></div>

##

## Settings

<div align="left" data-with-frame="true"><figure><img src="https://3353728891-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1dlOGDREop4WMfLcctYT%2Fuploads%2F5qoz1ayOqDGLoKh0kCj6%2Fimage.png?alt=media&amp;token=81faa8bd-cdf8-4afd-a8dd-69a78554c6e7" alt=""><figcaption></figcaption></figure></div>

| Setting    | Description                                                                                |
| ---------- | ------------------------------------------------------------------------------------------ |
| Divergence | Lookback Range. Sets how many candles back the script looks for highs and lows.            |
| Deviation  | Sensitivity. Adjusts the calculation for the +1/+2 levels and filters out "noisy" signals. |
| Hidden     | Trend Continuation. Toggle to show or hide Hidden Divergence signals.                      |
