On-Balance Volume (OBV)

Cumulative volume that adds up-bar volume and subtracts down-bar volume. A confirmation indicator — used to validate price moves, not generate them.

IndicatorBy AlgoLiftUpdated 4 min read
On this page 13What it measuresFormulaInputs in AlgoLiftRecommended settingsOutputs in AlgoLiftHow to read itBest in / worst inThree confirmation patterns1. Trend confirmation2. Breakout confirmation3. Divergence detectionAdvanced patterns in AlgoLiftCommon mistakes

A cumulative running total that adds each bar's volume on up days and subtracts it on down days. OBV is a confirmation tool, not a primary signal generator — its main job is to validate or invalidate price moves that came from other systems. Developed by Joseph Granville in 1963.

What it measures

  • Cumulative volume flow. Running total of volume, signed by each bar's direction.
  • Conviction behind moves. Rising OBV during a price rally = volume confirms the move. Flat OBV during a price rally = the rally lacks volume support.
  • Hidden distribution / accumulation. When OBV diverges from price, the move is happening on thin volume — often precedes a reversal.

Formula

Inputs in AlgoLift

SettingDefaultRangeNotes
Smoothing Period101–200EMA period applied to raw OBV. Lower = closer to raw; higher = smoother.
  • 10 (default): Standard. Provides enough smoothing for trend identification without obscuring divergences.
  • 5: Faster — better for short-timeframe trading.
  • 20: Slower — for swing setups where you want a very clean OBV trend.

Outputs in AlgoLift

HandleTypePlottedNotes
OBV (Raw)NumericAlwaysThe unsmoothed cumulative total. Drifts indefinitely.
OBV (Smoothed)NumericAlwaysEMA-smoothed OBV. The primary reading.
Slope (Smoothed)NumericOn selectRate of change of the smoothed OBV. Confirms direction more cleanly than the raw value.

How to read it

  • OBV rising while price rises: Confirmation — volume supports the upward move. Healthy uptrend.
  • OBV falling while price falls: Confirmation — volume supports the downward move. Healthy downtrend.
  • OBV flat while price moves: Divergence — the move is happening without volume support. Often precedes a reversal.
  • OBV makes a new high while price doesn't: Bullish divergence — accumulation is happening under the surface.
  • OBV makes a new low while price doesn't: Bearish divergence — distribution is happening.

The direction and slope of OBV matter; the absolute value doesn't. OBV at 1,250,000 vs. 12,500,000 means nothing in isolation — what matters is whether it's trending up or down relative to price.

Key Takeaway

OBV confirms; price decides. The strongest OBV signal is divergence — when OBV disagrees with what price is doing, one of them is wrong. Statistically, the price move is the one that fails first. Use OBV to filter out price signals that lack volume support, not to generate signals.

Best in / worst in

Best in trending markets on liquid instruments, where volume genuinely reflects institutional participation. Particularly useful on daily charts of major equity indices and high-volume single stocks.

Worst in off-hours futures and very-low-volume instruments. Also weak in markets where most volume comes from algorithmic market-making (not directional flow), which can muddy the signal.

Three confirmation patterns

1. Trend confirmation

Use OBV slope to validate trends from price-based systems.

  • Valid long trend: Price > EMA(50) AND OBV Slope > 0.
  • Valid short trend: Price < EMA(50) AND OBV Slope < 0.
  • Suspect trend: Price trending but OBV slope is flat or inverse — skip new entries.

2. Breakout confirmation

Filter breakouts by OBV agreement.

  • Valid upside breakout: Price breaks 20-bar high AND OBV (Smoothed) also makes a new 20-bar high (or close to it) on the same bar.
  • Valid downside breakout: Symmetric.
  • Failed breakout: Price makes a new high but OBV doesn't follow → fade or skip.

Use Bars Ago Modifier to track OBV's 20-bar high alongside price's.

3. Divergence detection

The signature OBV pattern — and the one most worth wiring carefully.

  • Bearish divergence: Price's 10-bar high > price's 10-bar high from 10 bars ago AND OBV's 10-bar high < OBV's 10-bar high from 10 bars ago.
  • Bullish divergence: Symmetric for lows.

When divergence fires and a regime filter agrees the market is range-bound (KAMA ER < 0.3), the signal becomes a high-quality counter-trend entry.

Advanced patterns in AlgoLift

OBV divergence, read by regime. In trends, OBV divergence is often a warning (don't add to the position) rather than a reversal entry. In ranges, divergence is a real reversal signal. Use regime mode (Activate Regime) to read divergence differently in each, or AND the divergence entry with a ranging condition.

OBV slope as a scaled entry gate. Take initial position on a price-based system. Use Scale-In Entry to add only when OBV slope confirms the move (positive for longs, negative for shorts). Volume-confirmed scaling avoids adding to false-trend positions.

Multi-timeframe OBV agreement. Add a daily series alongside intraday execution. Require daily OBV slope to agree with intraday entry direction. The cross-timeframe filter eliminates trades happening against macro volume flow.

Common mistakes

  • Reading absolute OBV values. The cumulative sum drifts to arbitrary numbers — OBV at 5 million vs. 50 million tells you nothing without context. Always read the slope or trajectory.
  • Trading OBV as a primary signal. OBV alone doesn't generate edges. It validates or invalidates signals from other systems. Treat it as a filter, not a trigger.
  • Using OBV on intraday volume that's been distorted. Earnings reports, news halts, and rebalancing flows produce volume that isn't directional — they spike OBV without representing real positioning. Apply session and event filters.
  • Ignoring divergence direction. Divergence between price and OBV is informative; divergence between price and OBV's slope is more so. Read both.
Common Misconception
Myth
OBV measures the dollars flowing in or out of an instrument.
Reality
OBV is volume-count weighted by price direction, not dollar-weighted by anything. A 100-share trade at $50 and a 100-share trade at $500 contribute equally to OBV (both are +100 or −100 depending on the bar). Indicators like [A/D Line](/guide/reference/indicators/ad-line) and [CMF](/guide/reference/indicators/cmf) attempt to capture dollar flow more directly; OBV captures participation count.