On-Balance Volume (OBV) converts reported volume into a cumulative series using the direction of each close. Unlike total volume, it distinguishes rising and falling closes. Understanding this distinction helps traders interpret confirmation and divergence without mistaking the indicator for direct order-flow measurement.
How OBV is calculated
For each completed bar, compare its close with the previous close. If it rises, add the entire current volume; if it falls, subtract that volume; if unchanged, leave OBV unchanged. In compact notation, OBV(t) = OBV(t−1) + sign(C(t)−C(t−1)) × V(t). The initial level can be zero or another convention; changing the seed by a constant shifts the series without changing its increments.
A worked example
Assume an initial close of 100 and OBV of zero. The following six hypothetical bars illustrate all three update rules.
| Bar | Close | Volume | OBV |
|---|---|---|---|
| 1 | 102 | 800 | 800 |
| 2 | 101 | 500 | 300 |
| 3 | 101 | 900 | 300 |
| 4 | 103 | 1200 | 1500 |
| 5 | 102 | 700 | 800 |
| 6 | 104 | 1000 | 1800 |

Rising bars contribute 3,000 units, falling bars subtract 1,200, and the unchanged bar contributes zero despite recording 900 units. Total reported volume is 5,100, but the net OBV change is only 1,800. If the same volumes occurred with the opposite close directions, OBV would instead fall by 1,800. Volume alone therefore cannot determine OBV.
Using OBV for trend confirmation
Compare corresponding price and OBV swing points. In the example, price advances from 102 at bar 1 to 103 at bar 4 and 104 at bar 6; OBV at those points rises from 800 to 1,500 and 1,800. This is consistent with positive signed volume accompanying the advance. It is not proof that the next bar will rise.
A bearish divergence may occur when price establishes a higher confirmed swing high but OBV forms a lower corresponding high. Treat that as a warning rather than an automatic short entry. Define the pivot rule in advance: a pivot requiring two bars to its right becomes known only after those two bars close. Backdating a trade to the pivot introduces look-ahead bias.
Practical confirmation workflow
- Use a consistent instrument, timeframe and volume source.
- Wait for completed bars and identify confirmed price swing points.
- Compare OBV at corresponding swings; avoid comparing unrelated extrema.
- Require an independently defined price trigger, such as a close below a support level for a bearish setup.
- Specify invalidation and risk before testing the rule, including commissions and slippage.
Common mistakes and limitations
OBV assigns all bar volume according to close direction, even when the price change is tiny. It does not measure actual buyer-initiated minus seller-initiated volume. A large isolated volume spike can permanently shift the cumulative series. Absolute values across different instruments, data histories or initialization conventions are not directly comparable. Tick volume and exchange-reported traded volume are also different inputs; results depend on the feed. Intrabar values can change as both close and volume evolve.
For systematic evaluation, compare a price-only baseline with the same strategy plus an OBV filter, using identical execution assumptions and chronological out-of-sample data. Check whether the filter improves net expectancy and drawdown rather than merely reducing trade count. Test sensitivity to the pivot definition and avoid selecting parameters solely from the best historical result.
For tailored OBV alerts, scanners or strategy integration, explore our Custom Trading Software Development Services.
Risk disclaimer: This material is educational. All numerical examples are hypothetical. Technical indicators cannot guarantee future performance; trading involves risk of loss.