OBV Divergence +
Nov 29, 2019

The OBV Divergence + indicator provides a comprehensive analysis of volume-based momentum by combining On-Balance Volume (OBV) with dual moving averages and automated divergence detection. It serves as a powerful tool for identifying potential trend reversals and continuations through both regular and hidden divergences across three different calculation streams.
Usage
The indicator can be used to spot discrepancies between price action and volume flow. Users can monitor three distinct series for divergences: the primary OBV line, a Fast Moving Average, and a Slow Moving Average.
- Regular Divergences: Typically indicate potential trend reversals. For example, if price makes a higher high but the OBV makes a lower high, a bearish reversal may be imminent.
- Hidden Divergences: Generally suggest trend continuation.
- Divergence Labels: The script plots "R" for Regular and "H" for Hidden divergences directly on the oscillator pane.
- MA Crosses: The two moving averages (Fast and Slow) can be used to identify trend direction and momentum shifts within the volume data itself.
Details
The tool offers two main calculation methods for the underlying volume data:
- Standard OBV: The classic cumulative total of volume based on whether the current bar's source is higher or lower than the previous one.
- OBV Accumulation / Distribution: A modified version that factors in the intraday range
(close - open) / (high - low), which some traders consider a truer representation of buying and selling pressure.
Divergences are identified using a fractal-based logic that looks for local peaks and troughs in the OBV and its averages, then compares them against price peaks and troughs.
Settings
OBV Configuration
- OBV Type: Choose between "Standard" and "OBV Accumulation / Distribution".
- OBV Source: Select the price source used for the calculation (recommended: "Close" for Standard, "Open" for Acc/Dist).
- OBV - Directional Color Changing: Enables the OBV line to change color based on whether it is rising or falling.
Moving Averages
- Fast MA Type/Length: Define the type (SMA/EMA) and period for the fast signal line.
- Slow MA Type/Length: Define the type (SMA/EMA) and period for the slow signal line.
Divergence Display
- Divergences Offset: Adjusts the plot to either a realistic entry point (current bar) or the historical peak/trough.
- Regular/Hidden Divergences: Toggle switches to show or hide specific divergence types for the OBV, Fast MA, and Slow MA independently.
- Divergence Labels: Toggles the "R" and "H" text labels.
FAQ
How do I interpret the different colors in the labels? Red/Maroon labels typically indicate bearish divergences, while Green/Teal labels indicate bullish divergences.
Which OBV type should I use? The Standard OBV is better for traditional volume analysis, while the Accumulation / Distribution type is often preferred for more sensitive intraday trend identification.
How can I access OBV Divergence +? 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.
Unlock the entire LuxAlgo Library
Every indicator, every strategy, full charts, and complete access to Quant — our AI agent.