All indicators

On-Balance Volume Oscillator with Divergence and Pivots

Sep 2, 2021

Static chart image
Volume BasedSignalsOscillatorsDivergencesPivot Based (Retrospective)

The On-Balance Volume Oscillator with Divergence and Pivots indicator transforms standard OBV into a zero-bound oscillator to identify momentum shifts and volume-price discrepancies.

Usage

The indicator is primarily used to identify trend reversals and continuations through volume analysis. When the oscillator is above zero and colored green, buying pressure is dominant; when below zero and colored red, selling pressure prevails.

Divergence Detection

The script automatically identifies four types of volume-price divergences:

  • Regular Bullish (Green Label): Price makes a lower low while the oscillator makes a higher low, suggesting a potential upward reversal.
  • Hidden Bullish (Blue Label): Price makes a higher low while the oscillator makes a lower low, suggesting trend continuation.
  • Regular Bearish (Red Label): Price makes a higher high while the oscillator makes a lower high, suggesting a potential downward reversal.
  • Hidden Bearish (Orange/Dark Red Label): Price makes a lower high while the oscillator makes a higher high, suggesting trend continuation.

Pivot Points

Triangular markers on the oscillator line represent OBV pivots. A triangle up (green) indicates a local bottom in volume momentum, while a triangle down (red) indicates a local peak. These often precede price action reversals, providing leading signals for traders.

Details

The On-Balance Volume (OBV) is a cumulative total of volume that adds volume on up days and subtracts it on down days. This tool recalculates OBV as an oscillator by calculating the difference between a short-term and long-term Exponential Moving Average (EMA) of the OBV line. This centered-oscillator format makes it easier to visualize volume cycles and detect divergences that might be obscured on a standard cumulative OBV line.

Settings

  • Source: The price source used for divergence calculations (default: Close).
  • Short OBV period: The fast EMA length for the oscillator calculation.
  • Long OBV period: The slow EMA length for the oscillator calculation.
  • OBV Wave Pivot Lookback (Right/Left): Sets the window for identifying pivot highs and lows on the oscillator.
  • Divergence Pivot Lookback (Right/Left): Determines the sensitivity and delay of divergence detection.
  • Lookback Range (Max/Min): Defines the bar distance permitted between two peaks or troughs to qualify as a divergence.
  • Plotting Toggles: Options to enable or disable the display of specific divergence types.

FAQ

How do I interpret the zero-line cross?

A crossover above zero indicates that short-term volume momentum has turned positive relative to the long-term trend, while a crossunder suggests weakening volume support.

What is the difference between regular and hidden divergence?

Regular divergence signals a possible trend reversal, whereas hidden divergence typically signals that the current trend is likely to continue after a retracement.

How can I access 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.