On Balance Volume
systemic:core-obvIndicatorsInputs
| Name | Type | Description |
|---|---|---|
| Price | Number series | The closing price series, which decides whether each bar's volume is added to or subtracted from OBV. |
| Volume | Number series | The trading volume series: the number of shares, contracts or units traded in each bar. |
Outputs
| Name | Type | Description |
|---|---|---|
| OBV | Number series | A running total of volume, added on bars where price rises and subtracted on bars where it falls. |
Cost
0.198 + 0.00588·n credits for n bars, rounded up. The marks are each plan's limit of bars.
Overview
On Balance Volume (OBV) is a momentum indicator developed by Joseph Granville in 1963 and introduced in his book Granville's New Key to Stock Market Profits. The core idea behind OBV is simple: volume precedes price.
Granville observed that large price moves usually follow changes in volume. When large volume flows into an asset and the price does not move yet, the indicator suggests a price move is building up, like a coiled spring.
The Core Principle: OBV ignores the size of a price change and looks only at its direction. If a bar closes higher than the previous bar, all of its volume counts as "buying pressure." If it closes lower, it counts as "selling pressure."
OBV is one of the simplest volume indicators. It can still show hidden accumulation or distribution before the price catches up.
The Formula
OBV is a running total. It starts at 0 on the first bar, then adds or subtracts each bar's volume, depending on the price direction:
Where:
- = Volume at time
- = Closing price at time
- = Previous OBV value
Calculation Logic
flowchart TD
START["📊 New Period Data<br/>(Price, Volume)"]
COMPARE{"Compare Today's Close<br/>to Yesterday's Close"}
UP["Today > Yesterday<br/>🟢 UP DAY"]
DOWN["Today < Yesterday<br/>🔴 DOWN DAY"]
FLAT["Today = Yesterday<br/>⚪ UNCHANGED"]
ADD["Add Volume to OBV<br/>OBV = OBV + Volume"]
SUB["Subtract Volume from OBV<br/>OBV = OBV − Volume"]
KEEP["Keep OBV Unchanged<br/>OBV = OBV"]
OUTPUT["📈 New OBV Value"]
START --> COMPARE
COMPARE -->|Higher| UP --> ADD --> OUTPUT
COMPARE -->|Lower| DOWN --> SUB --> OUTPUT
COMPARE -->|Equal| FLAT --> KEEP --> OUTPUT
Step-by-Step Example
Consider a stock over 5 days with the following data:
| Day | Close | Volume | Price Change | OBV Calculation | OBV |
|---|---|---|---|---|---|
| 1 | $10.00 | 1,000 | — | Start at 0 | 0 |
| 2 | $10.50 | 2,000 | ↑ Up | 0 + 2,000 | 2,000 |
| 3 | $10.30 | 1,500 | ↓ Down | 2,000 − 1,500 | 500 |
| 4 | $10.30 | 800 | → Unchanged | 500 + 0 | 500 |
| 5 | $10.80 | 3,000 | ↑ Up | 500 + 3,000 | 3,500 |
On Day 4, 800 shares traded, but the price did not change, so none of that volume affected OBV. Only bars with a price change count.
Interpreting OBV
The Absolute Value Doesn't Matter
Unlike price, the level of OBV has no meaning by itself: it depends on where the calculation started. What matters is the trend and direction of OBV:
| OBV Behavior | Interpretation |
|---|---|
| Rising OBV | Volume is flowing into the asset (accumulation) |
| Falling OBV | Volume is flowing out of the asset (distribution) |
| Flat OBV | No clear volume conviction |
Smart Money Theory
Granville believed OBV could reveal the activity of institutional investors ("smart money") before retail traders caught on:
- Institutional accumulation: Large buyers start purchasing before a rally. OBV rises while price stays flat.
- Price follows volume: Eventually, retail buyers notice and push prices up.
- Institutional distribution: Large sellers exit at the top. OBV falls while price stays elevated.
- Price catches down: Retail holders are left with falling prices.
Key Trading Signals
1. Trend Confirmation
When OBV moves in the same direction as price, the trend is confirmed:
| Price Trend | OBV Trend | Interpretation |
|---|---|---|
| ↑ Rising | ↑ Rising | Strong uptrend with volume support |
| ↓ Falling | ↓ Falling | Strong downtrend with volume support |
2. Divergences
Divergences between OBV and price can signal potential reversals:
flowchart LR
subgraph BULL["🟢 Bullish Divergence"]
B1["Price makes<br/>LOWER lows"]
B2["OBV makes<br/>HIGHER lows"]
B3["Accumulation detected<br/>Potential reversal UP"]
end
subgraph BEAR["🔴 Bearish Divergence"]
C1["Price makes<br/>HIGHER highs"]
C2["OBV makes<br/>LOWER highs"]
C3["Distribution detected<br/>Potential reversal DOWN"]
end
B1 --> B2 --> B3
C1 --> C2 --> C3
3. Breakout Confirmation
OBV can confirm price breakouts:
- Strong breakout: Price breaks resistance AND OBV breaks its own resistance
- Weak breakout: Price breaks resistance but OBV fails to confirm (potential false breakout)
Practical Applications
Volume-Price Confirmation Strategy
Before you act on a signal, use OBV to check that volume supports the price move:
- Identify a price trend or potential breakout
- Check if OBV confirms the direction (rising OBV for bullish, falling for bearish)
- Watch for OBV to break its own trendlines or levels
- Treat the signal as valid only when both price AND volume confirm
Accumulation/Distribution Detection
OBV can reveal hidden buying or selling:
- Flat price + Rising OBV: Someone is quietly accumulating shares
- Flat price + Falling OBV: Someone is quietly distributing shares
- These patterns often precede significant moves
Multi-Asset Flow Analysis
Compare OBV trends across related assets to see where capital is flowing. For example, if Bitcoin's OBV is rising while Ethereum's is falling, it may indicate rotation from ETH to BTC.
Edge Cases and Limitations
Leading Indicator Risks
As a leading indicator, OBV can give signals before price confirms them, and some of them are false. Always use OBV together with other analysis.
Gap Days Can Distort OBV
If a stock gaps up on very large volume (for example after an earnings surprise), all of that day's volume is added to OBV, even if the move is a one-time event. This can skew the indicator for a long time.
No Magnitude Consideration
OBV treats a $0.01 gain with 1 million shares the same as a $10 gain with 1 million shares. Both add 1 million to OBV. Consider using Volume-Price Trend (VPT) if magnitude matters.
Low-Volume Periods
In low-volume markets or during consolidation, OBV can give erratic signals. It works best when there is enough volume to analyze.
Data Alignment and Multi-Input Considerations
OBV needs Price and Volume series that cover the same bars. Systemic matches the two inputs by time, bar by bar.
Critical Alignment Warning
OBV's logic depends on comparing consecutive closes:
Misaligned data can produce:
- Incorrect direction assignments when price and volume correspond to different periods
- Distorted cumulative totals that compound over the entire OBV history
Best Practice: Always take Price and Volume from the same data source, symbol and period. OBV is cumulative, so an early mismatch stays in every later value.
Missing Data (Closed-Market Bars)
On a bar with no price or no volume (a weekend, holiday or data gap), OBV is empty. It does not assume "unchanged". The running total continues on the next bar that has both values, and that bar is compared with the last known close. Monday is therefore compared with Friday. OBV starts at 0 on the first bar that has both price and volume. A bar with a price but no volume still updates the last known close used by the next comparison.
Indicator Profile
quadrantChart
title OBV Indicator Profile
x-axis Low Popularity --> High Popularity
y-axis Low Reliability --> High Reliability
quadrant-1 High potential
quadrant-2 Established leaders
quadrant-3 Niche tools
quadrant-4 Popular but risky
OBV - Stocks: [0.75, 0.70]
OBV - Crypto: [0.65, 0.55]
Profile Dimensions
| Dimension | Stocks | Crypto | Explanation |
|---|---|---|---|
| Popularity | 0.75 | 0.65 | Classic indicator from 1963, widely taught and used. Cryptocurrency traders increasingly use volume-based analysis. |
| Reliability | 0.70 | 0.55 | Well-established for stocks with centralized volume data. Crypto reliability lower due to fragmented exchange volume and wash trading concerns. |
| Complexity | Low | Low | Simple directional logic makes OBV one of the most accessible volume indicators. |
| Versatility | High | Moderate | Works across all liquid equity markets. Crypto applicability limited by volume data quality concerns. |
| Recent Interest | Stable | Growing | Established staple in technical analysis. Crypto traders exploring volume indicators to detect whale activity. |
Further Reading
- On-Balance Volume (OBV) - Investopedia — Comprehensive guide with examples
- Volume Analysis - Investopedia — Understanding trading volume fundamentals
- Accumulation/Distribution Line - Investopedia — A related volume indicator for comparison