Volume & order-flow

OBV (On-Balance Volume)

A running total of volume that flows with price to reveal accumulation.

What is OBV (On-Balance Volume)?

On-Balance Volume (OBV), created by Joe Granville, is a cumulative volume line: it adds volume on up-closes and subtracts it on down-closes. The idea is that volume precedes price, so a rising OBV signals accumulation even before price confirms.

How it works

Each bar, the full volume is added to OBV if price closed up and subtracted if it closed down. The absolute value matters less than the trend and slope of the line. Divergence, OBV making new highs/lows that price doesn't, or vice versa, is the key signal.

How traders use it

  • Trend confirmation: a rising OBV supports an uptrend.
  • Divergence: OBV/price disagreement warns of a reversal.
  • Breakout confirmation: OBV breaking out with price adds conviction.
  • Accumulation/distribution: detect quiet buying or selling.

Build OBV (On-Balance Volume) without code in Algovex

OBV is a node in Algovex with divergence detection available. Use it to confirm breakouts or flag divergence in your strategy, backtest on volume data, and export.

Key parameters

ParameterWhat it does
sourceClose used to decide up/down volume direction.
smoothingOptional moving-average smoothing of the OBV line.

Frequently asked questions

What does OBV divergence mean?

OBV divergence is when the volume line and price move in opposite directions, for example price makes a higher high but OBV doesn't, suggesting the move lacks volume support and may reverse. Algovex can detect it for you.