All indicators

OBV Divergences

Jan 20, 2020

Static chart image
Volume BasedSignalsOscillatorsDivergencesPivot Based (Retrospective)

The OBV Divergences indicator identifies discrepancies between price action and cumulative volume flow to highlight potential trend reversals or continuations.

Usage

The OBV Divergences tool is used to find moments where the On-Balance Volume (OBV) oscillator does not confirm the current price movement. These instances, known as divergences, are often early signals of a shift in market momentum.

  • Regular Bullish Divergence: Occurs when the price makes a lower low while the OBV makes a higher low. This suggests that despite falling prices, selling pressure is decreasing or buying pressure is quietly accumulating.
  • Regular Bearish Divergence: Occurs when the price makes a higher high while the OBV makes a lower high. This indicates that the upward move is not backed by increasing volume, potentially signaling a reversal.
  • Hidden Divergences: These can also be enabled to find trend continuation signals. A hidden bullish divergence (higher low in price, lower low in OBV) often signals a continuation of an uptrend.

Details

The script calculates the standard On-Balance Volume by adding volume on up days and subtracting it on down days. To detect divergences, it utilizes pivot points (highs and lows) within the OBV oscillator. It then compares the relative levels of these oscillator pivots to the corresponding price pivots (highs and lows) within a user-defined lookback range.

The indicator plots labels and lines connecting the pivots directly on the OBV oscillator pane. Because it uses pivot lookbacks, signals appear after a specified number of bars (defined by the "Pivot Lookback Right" setting) to confirm the peak or trough.

Settings

  • Pivot Lookback Right: The number of bars to the right of a pivot required for confirmation.
  • Pivot Lookback Left: The number of bars to the left of a pivot required for confirmation.
  • Max of Lookback Range: The maximum number of bars allowed between the current pivot and the previous pivot to qualify for a divergence.
  • Min of Lookback Range: The minimum number of bars required between the current pivot and the previous pivot.
  • Plot Bullish: Toggles the display of regular bullish divergence labels and lines.
  • Plot Hidden Bullish: Toggles the display of hidden bullish divergence labels and lines.
  • Plot Bearish: Toggles the display of regular bearish divergence labels and lines.
  • Plot Hidden Bearish: Toggles the display of hidden bearish divergence labels and lines.

FAQ

How do I use the OBV Divergences tool?

You can use it to spot potential reversal points when price and volume momentum disagree, or to identify trend continuations via hidden divergences.

Why do the labels appear several bars late?

The indicator relies on pivot points, which require a "lookback right" period to confirm that a high or low has actually been formed.

How can I get access to this tool?

You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.

Free indicator

Get free access to this indicator on the platforms below.

TradingView
NinjaTrader
MetaTrader 4/5

Unlock the entire LuxAlgo Library

Every indicator, every strategy, full charts, and complete access to Quant — our AI agent.