On Balance Volume (OBV)
Calculates the On Balance Volume, a cumulative volume-based indicator that relates volume to price change. OBV is used to confirm price trends and identify potential reversals.
Formula
- If today's close > yesterday's close: OBV = Previous OBV + Today's Volume
- If today's close < yesterday's close: OBV = Previous OBV - Today's Volume
- If today's close = yesterday's close: OBV = Previous OBV
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
| Symbol | String | Required | Stock ticker symbol |
| Days | String | "14" | Number of days for calculation |
| StartDate | Date | None | Optional start date for historical data |
| Series | String | "False" | Whether to return series data |
Interpretation
| OBV Signal | Meaning |
|---|---|
| Rising OBV | Buying pressure, volume flowing into the stock |
| Falling OBV | Selling pressure, volume flowing out of the stock |
| OBV divergence from price | Potential trend reversal |
| OBV breakout | Confirmation of price breakout |
Notes
- OBV is a running total, so absolute values are less important than trends
- Use OBV divergence with price for reversal signals
- Works best with stocks that have significant volume
Examples
=OnBalanceVolume("AAPL")=OnBalanceVolume("AAPL", "20")=OnBalanceVolume("AAPL", "14", DATE(2024,1,1))=OnBalanceVolume(A1, "14")When to Use
- Confirming price trends with volume
- Identifying volume divergences
- Spotting accumulation/distribution
- Volume-based momentum analysis
When NOT to Use
| Scenario | Use Instead |
|---|---|
| Simple daily volume | Volume() |
| Average volume | AverageDailyVolume() |
| Price-based momentum | RelativeStrengthIndex() |
| Trend direction | SMA(), EMA() |
Common Issues & FAQ
Q: Why is OBV so large? A: OBV is a cumulative indicator that sums volume over time. The absolute value matters less than the trend.
Q: How do I interpret OBV divergence? A: If price makes a new high but OBV doesn't, it may signal weakness. If price makes a new low but OBV doesn't, it may signal strength.
Q: What period should I use? A: The default 14 days is standard. Longer periods show longer-term trends, shorter periods are more sensitive.
Q: Can OBV be negative? A: Yes, OBV can be negative if there's more selling pressure (down days) than buying pressure (up days) over the period.
