Why RSI divergence needs confirmed swing points

Regular bullish RSI divergence occurs when price makes a lower swing low while RSI is higher at the corresponding low. Regular bearish divergence reverses these inequalities. Neither pattern guarantees a reversal: momentum can weaken while a trend continues. A reproducible swing definition helps distinguish a developing candidate from a confirmed observation.

Define the indicator and the pivot

RSI = 100 − 100/(1 + RS), where RS is Wilder-smoothed average gain divided by Wilder-smoothed average loss. For a 14-bar RSI, initialize the averages with 14 changes, then update each with (13 × previous average + current gain or loss)/14. If average loss is zero and gain is positive, RSI is 100; if gain is zero and loss positive, RSI is zero. Define a consistent convention for flat data.

For a two-sided pivot with two bars on each side, a closing-price low must be strictly below all four neighboring closes. It becomes observable only at the close of the second subsequent bar. Sample RSI on the price pivot bar rather than independently selecting the most favorable oscillator low. Equal lows are excluded by this particular definition.

Worked example: hypothetical data

Nine consecutive closes are 106, 103, 100, 103, 105, 101, 97, 99, 102. Corresponding illustrative RSI readings are 48, 36, 28, 40, 48, 38, 34, 41, 49; these assume earlier history and are illustrative rather than calculated from the nine closes alone. The third and seventh closes are confirmed pivots at bars five and nine. Price falls by 3%, while RSI increases by six points. The bullish divergence is therefore observable at bar nine, not bar seven.

RSI Divergence: Filtering False Signals with Confirmed Swing Points
Hypothetical example: price lows fall from 100 to 97 while RSI rises from 28 to 34. Dashed lines mark confirmation after two subsequent bars.

Confirmation and practical application

A research scanner can require a minimum RSI difference of five points and a minimum price decline of 1%, with pivot spacing between four and twenty bars. The example passes all three filters. These are illustrative settings, not optimized thresholds. A separate structural confirmation could require a close above the intervening swing high of 105; the final close of 102 has not met that condition. Record the divergence and the structural confirmation as separate events.

Failure cases and common mistakes

In a persistent downtrend, repeated bullish divergences may precede further declines. A subsequent lower low can invalidate a candidate under a predefined rule. Avoid selecting pivots retrospectively, mixing intrabar and closing-price definitions, comparing unrelated oscillator lows, or treating an oversold reading as proof of reversal. Wider pivot windows reduce sensitivity but increase delay. Gaps, illiquidity and different RSI initialization methods can change results.

Validation and risk

Evaluate confirmed signals against an unfiltered pivot baseline using chronological training and held-out periods. Measure signal frequency, forward returns over fixed horizons, adverse excursion and transaction costs. Count signals at their actual confirmation time, and model fills no earlier than the next executable opportunity. Test sensitivity to pivot width and minimum differences; avoid selecting parameters solely from the best historical result. No backtest results are claimed here. Divergence is educational context, not a guarantee of profit; trading involves loss risk.

For a scanner that records pivot and confirmation timestamps separately, explore our Custom Trading Software Development Services.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.