Price/OBV divergence
May 13, 2016

The Price/OBV divergence indicator identifies and visualizes the relationship between price action and On-Balance Volume (OBV) to highlight potential market reversals or trend continuations. By comparing the directional movements of both price and volume, it provides a visual representation of when these two critical metrics are in agreement or when a divergence suggests an underlying shift in market momentum.
Usage
The tool is primarily used to spot discrepancies between price movement and volume flow. It is visually represented as a series of columns on an oscillator scale:
- Agreement: When both price and OBV move in the same direction, the indicator confirms the strength of the current trend.
- Bullish Divergence: If the price is trending downward while the OBV is trending upward, a bullish divergence is identified, suggesting that buying pressure is increasing despite falling prices.
- Bearish Divergence: If the price is trending upward while the OBV is trending downward, a bearish divergence is identified, suggesting that selling pressure is increasing despite rising prices.
Details
The indicator calculates On-Balance Volume (OBV) by cumulatively adding volume on up-days and subtracting it on down-days. To smooth out noise and focus on the primary trend, both the price and the OBV are processed through an Exponential Moving Average (EMA) based on a user-defined period. The script then compares the rate of change (direction) of these two smoothed values.
The visual output uses columns to represent the state of each component:
- Red columns represent the price direction.
- Blue columns represent the OBV direction.
- Full-height columns indicate clear direction, while reduced-height columns indicate a lack of consensus between the two, helping traders identify when the "smart money" (represented by volume) is leading the price.
Settings
- Period: Determines the length of the Exponential Moving Average (EMA) used to smooth both the price and the OBV data. A higher period results in fewer, more significant signals, while a lower period makes the indicator more sensitive to short-term changes.
FAQ
How do I interpret the divergence signals? A bullish divergence occurs when the price direction is negative but OBV direction is positive, often signaling a potential bottom. A bearish divergence occurs when the price direction is positive but OBV direction is negative, often signaling a potential top.
Can I use this for any timeframe? Yes, the Price/OBV divergence can be applied to any timeframe. However, it is often more reliable on higher timeframes (like 1H, 4H, or Daily) where volume trends are more established.
How do I access the Price/OBV divergence indicator? 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.