On-Balance Volume (OBV) Explained: Calculation, Divergence and Data Quality
On-Balance Volume (OBV) is a cumulative indicator that adds a bar’s volume if its closing price is higher than the previous close, subtracts volume if the close is lower, and leaves the total unchanged if the close is equal. It assigns the entire bar’s volume a positive or negative sign using closing-price direction. It is not a measurement of actual buyer- or seller-initiated volume.
Calculate OBV step by step
Choose a starting value, such as zero. For every subsequent completed bar, compare its close with the previous close. If the close rises, add that bar’s volume; if it falls, subtract it; if unchanged, add zero. Volume must refer to consistent units and a consistent market feed. The arbitrary starting value affects the absolute level but not the increments or relative changes over the same interval.
| Bar | Close (£) | Volume (shares) | Signed increment | Cumulative OBV |
|---|---|---|---|---|
| 0 | 100 | — | Starting value | 0 |
| 1 | 102 | 1,000 | +1,000 | 1,000 |
| 2 | 101 | 600 | −600 | 400 |
| 3 | 101 | 900 | 0 | 400 |
| 4 | 104 | 1,400 | +1,400 | 1,800 |
| 5 | 103 | 2,000 | −2,000 | −200 |
In this example price rises from £100 to £103 overall but OBV falls from zero to −200. The large-volume final down-close contributes more to the total than the net signed contributions before it. This demonstrates why cumulative OBV can diverge from price even over a short period.
What an OBV divergence means
A bearish divergence conventionally means price makes a higher comparable peak while OBV makes a lower one. A bullish divergence means price makes a lower comparable trough while OBV makes a higher one. Define confirmed pivots and their comparison window. A short difference between two arbitrary points does not automatically constitute a pivot divergence. For example, if price peaks at £110 and £115 while corresponding OBV peaks are 80,000 and 65,000, the second price peak has weaker cumulative signed-volume context under that definition. This does not prove that institutions are selling or that price will reverse.
OBV versus actual order flow and VWAP
| Measure | Inputs | What it describes |
|---|---|---|
| OBV | Close direction and total bar volume | Cumulative signed bar volume |
| Cumulative volume delta | Aggressor-side classified trades | Net aggressive buying minus selling under feed conventions |
| VWAP | Price multiplied by traded volume | Volume-weighted average execution-price reference |
| Accumulation/distribution line | Close location within current range and volume | Cumulative volume weighted by within-bar close location |
OBV gives the same sign to all volume in a bar even if much of the activity took place while price was moving in the opposite direction. A close one tick higher assigns the same positive sign as a substantial rally at the same volume. This simple construction is useful to understand, but it cannot recover information lost when trades are aggregated into OHLCV bars.
Data quality: shares, futures, forex and crypto
Exchange-traded shares and futures can have meaningful executed-volume data, but coverage may differ by venue, session and vendor. Futures contract rolls can create jumps in volume and price if continuous-series construction is inconsistent. Spot forex often uses broker tick volume instead of consolidated market-wide trading volume; an OBV-like calculation on ticks is a different proxy. Crypto trading volumes differ across venues and pairs, so avoid combining series without checking units and coverage. A stock split may require consistent historical price and volume adjustment to avoid misleading changes.
How to test OBV responsibly
Choose a feed, session, bar size, starting convention and pivot rule. Compare a price-only rule with an identical rule plus OBV, controlling for volatility and liquidity. Check whether a single exceptional volume bar dominates the signal; record it rather than removing inconvenient observations after the fact. Use completed bars and first eligible execution prices, account for spreads and commissions, and validate on later unseen data.
Reconcile two feeds before interpreting divergence
Suppose the closing prices are the same on two stock-chart feeds but one includes extended-session transactions in its volume totals. If one feed reports 2,000 shares on the final down-close in the worked example and the other reports 1,200, their final OBV values would be −200 and +600 respectively, assuming equal prior observations. That difference is a consequence of the volume input, not evidence that one chart has identified hidden buyers. Compare the session definitions, adjustment policy and volume units first. When using a spreadsheet, initialise the series once; for each subsequent row add the volume if the closing price is greater than the preceding close, subtract it if lower and add zero if unchanged. Avoid resetting the starting balance midway through a comparison unless the research rule explicitly resets it at each session.
For another volume-weighted oscillator, compare Money Flow Index, which uses rolling price-volume sums rather than a cumulative signed total.
Frequently asked questions
Can OBV be negative?
Yes. It is a cumulative total relative to an arbitrary starting value.
Does positive OBV mean net buying?
No. It reflects the signed-volume calculation, not a net count of actual buyers and sellers.
Why does OBV differ across platforms?
Different session coverage, volume feeds, adjustment policies and initialization dates can change the displayed values.
Related: cumulative volume delta, VWAP and volume profile.
Continue your learning with technical analysis foundations and learning pathways and Accumulation/Distribution Line.
Further reading
StockCharts ChartSchool: On Balance Volume explains the conventional cumulative signed-volume method.
General educational material only, not personalised financial advice. Trading involves risk of loss.
Stay Ahead of the Markets
Get market analysis, financial news and practical trading insights delivered straight to your inbox.