TradingCharts

Divergence Indicator

Regular bullish divergence after an extended decline is a reversal warning: look for longs once price confirms with a break of a short-term swing high.

What it does

The Divergence Indicator automatically compares swing highs and lows in price with the corresponding swings in an oscillator (typically RSI or MACD) and flags disagreements. Regular bullish divergence is a lower low in price with a higher low in the oscillator; regular bearish divergence is a higher high in price with a lower oscillator high. Hidden divergences (oscillator making the more extreme swing) signal trend continuation instead.

Typeoscillatorseparate pane

How to add it

Click Indicators (ƒx) in the header.

Search “Divergence Indicator” and click the result.

Hover its legend row and click the gear to open settings.

How traders use it

  • Regular bullish divergence after an extended decline is a reversal warning: look for longs once price confirms with a break of a short-term swing high.
  • Regular bearish divergence at new price highs warns momentum is fading; tighten stops or look for shorts on confirmation.
  • Hidden bullish divergence during a pullback in an uptrend (higher price low, lower oscillator low) supports trend-continuation entries.
  • Never trade the flag alone; require a price trigger such as a reversal candle, trendline break, or structure break.
  • Divergences on higher timeframes and at major support/resistance carry far more weight than intraday ones in the middle of a range.

Inputs

Input Type Default Range / Options
RSI Period number 14 2–50
Lookback number 5 2–20
Pivot Lookback number 5 2–20

Plots & styling

Plot Style Default color
RSI line #673ab7
Bullish Div circles #26a69a
Bearish Div circles #ef5350

Every plot's color, line width and visibility can be changed on the Style tab. Precision (default 4 decimals), price-scale labels and status-line values are configurable at the bottom of the Style tab.

Tips

  • Reference levels (where the study has them) are editable — tune them to the instrument you're trading.
  • Hide the study from the legend eye instead of removing it when you only want it out of the way temporarily.
  • Merge multiple oscillators into one pane from the legend ⋯ menu to compare them on a shared axis.

Watch out for

  • Divergence detection depends on pivot confirmation, so signals appear bars after the actual swing and some tools repaint the latest pivot.
  • In strong trends divergences can stack repeatedly ('divergence on divergence') before any reversal, so counter-trend entries on the first signal often lose.