On-Balance Volume (OBV): Formula & Strategies

Price tells you what happened. Volume tells you how many people took part. A rally on heavy buying is very different from a rally that nobody joins.

On-Balance Volume (OBV) turns that idea into one simple line. It adds volume on up days and subtracts it on down days, so you can see whether volume is flowing into or out of a market. Its creator believed that volume often moves before price.

In this guide you will learn the OBV formula with a worked example, how to read the line, how to spot an OBV divergence, which settings to use, and three rule-based strategies, plus an honest look at when the OBV indicator fails, using a real Microsoft chart.

On-Balance Volume Quick Facts

FeatureDetail
CreatorJoseph E. Granville
Year1963 (Granville’s New Key to Stock Market Profits)
Indicator typeCumulative volume indicator (separate panel)
Default settingsNo length: OBV is a running total. An optional signal line (moving average) is common.
Best marketsStocks, ETFs and futures with real exchange volume
Best timeframesDaily and weekly; works on intraday charts, but with more noise
Weak marketsForex (no central volume) and thinly traded instruments

Origin and History

Joseph Granville was an American stock market writer and newsletter publisher. He introduced On-Balance Volume in his 1963 book Granville’s New Key to Stock Market Profits.

Granville’s central idea was that volume tends to come before price. If big buyers are quietly accumulating a stock, volume on up days should grow before the price breaks out. If they are quietly selling, the opposite happens. OBV was his way of measuring that hidden flow with simple arithmetic, long before computers made charting easy.

Similar cumulative volume ideas existed before, but Granville’s close-to-close version is the one that charting platforms use today.

The OBV Formula

OBV is a running total. Each bar, you compare today’s close with yesterday’s close:

If Close today > Close yesterday:  OBV = OBV yesterday + Volume today
If Close today < Close yesterday:  OBV = OBV yesterday − Volume today
If Close today = Close yesterday:  OBV = OBV yesterday
  • Close: the bar’s closing price
  • Volume: the number of shares, contracts or units traded in that bar
  • The whole bar’s volume is added or subtracted. The size of the price move doesn’t matter, only its direction.

Worked example (6 days)

The close before Day 1 was 100.0. We start OBV at 0.

DayClosevs previous closeVolumeRuleOBV
1101.5Up (from 100.0)1,200+ 1,2001,200
2101.0Down800− 800400
3101.0Unchanged600No change400
4102.5Up1,500+ 1,5001,900
5103.0Up900+ 9002,800
6102.0Down700− 7002,100

The arithmetic: 0 + 1,200 = 1,200 → 1,200 − 800 = 400 → 400 → 400 + 1,500 = 1,900 → 1,900 + 900 = 2,800 → 2,800 − 700 = 2,100.

Look at Day 4: a big up day on the highest volume of the week pushed OBV up strongly. Day 6 was a down day, but on lighter volume, so OBV fell less than it had risen.

Why the number itself doesn’t matter

OBV depends on where the calculation starts. Start the chart one year earlier, and every OBV value changes. That’s why the numbers on the scale (for example, “13.3B” on a Microsoft chart) mean very little on their own.

What matters is the direction and the shape of the line: rising or falling, making new highs or lows, and how those compare with price.

How to Read the OBV Indicator

  • Rising OBV: more volume on up days than on down days. Buyers are more active (often called accumulation).
  • Falling OBV: more volume on down days. Sellers are more active (distribution).
  • Confirmation: price and OBV make new highs (or new lows) together. The trend has volume behind it.
  • Non-confirmation: price makes a new high, but OBV doesn’t. The move has less volume support than before.
  • OBV breakout: OBV breaks above its own recent high or resistance line. Granville read this as a possible early sign of a price breakout.

OBV divergence

TypePriceOBVPossible meaning
Bearish OBV divergenceHigher highLower or equal highLess volume behind the rally; it may be weakening
Bullish OBV divergenceLower lowHigher lowLess selling volume behind the drop; it may be ending

This works the same way as RSI divergence: compare the swing highs (or lows) of price with the swing highs (or lows) of the indicator.

What the Microsoft chart shows

  1. Non-confirmation (July 2024): price rose from about 421 (February) to 468 (July), an 11% higher high. OBV only matched its February peak. Volume didn’t support the new high, and price fell to about 386 in August.
  2. A failed signal (December 2024): OBV made a new high above its July level, while price made a lower high. That looked like hidden buying. Instead, price fell to about 345 by April 2025. OBV is not always right.
  3. Confirmation (May–July 2025): price and OBV rose together, and both broke above their earlier highs in June. Volume backed the new uptrend.

OBV Settings

SettingDefaultWhat it doesNotes
OBV lineNo lengthRunning total from the first bar on the chartNothing to tune
Signal line (optional)Often a 20-period moving average of OBVSmooths OBV and gives crossoversShorter = faster, noisier; longer = slower, smoother
TimeframeChart timeframeDaily volume vs intraday volumeDaily OBV is the most widely used

On TradingView, the built-in On Balance Volume indicator draws the OBV line. Depending on your version, its settings may offer a smoothing line; if not, you can apply a moving average to OBV with TradingView’s “Indicator on indicator” feature.

Starting points by trading style (to test, not proven best values):

Trading styleChartSignal line
Scalping1–5 minNot recommended (intraday volume is noisy)
Intraday15 min – 1H20 EMA of OBV, for direction only
SwingDaily20 EMA of OBV
PositionalWeekly10–20 SMA of OBV

OBV Strategies

These are educational examples, not recommendations. Test any rule on your own market and timeframe first, and decide your risk per trade in advance.

Strategy 1: OBV breakout before price

  • Setup: price is moving sideways in a range. Draw a line across OBV’s recent highs.
  • Signal: OBV breaks above its line while price is still inside the range.
  • Entry: when price closes above the range high. Don’t buy on the OBV signal alone.
  • Stop-loss: below the range middle, or 1.5–2 × ATR.
  • Exit: a trailing stop, or when OBV makes a clear lower high.
  • Fails when: OBV breaks out but price never follows (like December 2024 on our chart).

Strategy 2: OBV divergence with price confirmation

  • Setup: a bearish divergence (price higher high, OBV lower or equal high) near resistance, or a bullish divergence (price lower low, OBV higher low) near support.
  • Entry: only after price confirms. For a bearish divergence, wait for a close below the last swing low between the two highs; for a bullish divergence, a close above the last swing high.
  • Stop-loss: beyond the second high (or low).
  • Exit: the next support or resistance level, or a 2:1 reward-to-risk target.
  • Works best: after long trends, at clear levels.
  • Fails when: the trend is very strong. Divergences can repeat several times before a turn.

Strategy 3: OBV as a trend filter

  • Rule: take long trades from your main strategy only when OBV is above its 20-period moving average and rising; take shorts only when it is below and falling.
  • Example: combine with a MACD crossover or a breakout system.
  • Why it helps: it keeps you out of breakouts that have little volume behind them.

Confluence: What to Pair With OBV

Pair withWhy it helps
Price levels (support, resistance, trendlines)OBV signals are far more useful at a level than in the middle of a range.
VWAPVWAP shows the volume-weighted average price; OBV shows the direction of volume flow.
Volume ProfileShows where volume traded; OBV shows whether it was mostly buying or selling over time.
MACD or RSIPrice momentum plus volume flow: a divergence on both is stronger than either alone.

Redundant pairings to avoid: OBV with the Accumulation/Distribution line, Chaikin Money Flow or another cumulative volume line. They are all built from volume and price direction or position, so they usually tell the same story.

Limitations and Common Mistakes

  1. One huge volume day distorts OBV. An earnings day, an index rebalance or a large block trade can push OBV up or down sharply and change its shape for months.
  2. It ignores the size of the move. A day that closes up by 0.01 adds its full volume, just like a day that closes up 5%.
  3. The value depends on the start date. Compare shapes and swings, never the raw number, especially across different stocks.
  4. Poor volume data. Forex has no central exchange, and some crypto volume is spread across many exchanges. OBV works best with real exchange volume.
  5. Signals can fail. As our December 2024 example shows, OBV can rise while price falls further. Always wait for price confirmation.
  6. Over-reading tiny differences. A divergence where OBV is only slightly lower is weak evidence. Look for clear differences at important price levels.

Frequently Asked Questions

What is on-balance volume?

On-balance volume (OBV) is a running total of volume: it adds the day’s volume when the price closes higher and subtracts it when the price closes lower. It shows whether volume is flowing into or out of a market.

How do you calculate the OBV indicator?

Start from any value. Each day, add the day’s volume if the close is higher than yesterday’s, subtract it if the close is lower, and leave OBV unchanged if the close is the same.

What is an OBV divergence?

An OBV divergence happens when price and OBV disagree. A bearish divergence is a higher high in price with a lower (or equal) high in OBV. A bullish divergence is a lower low in price with a higher low in OBV.

What is a good OBV value?

There isn’t one. The OBV number depends on where the calculation starts. Only its direction, its swings and its relationship with price matter.

Does OBV work for crypto and forex?

It works best with real exchange volume. In forex, the volume comes from a single data provider, so OBV is only an estimate. In crypto, volume can differ a lot between exchanges, so use a data source with broad coverage.

Does OBV repaint?

No. OBV values on closed bars stay fixed. On the current bar, OBV changes with price and volume until the bar closes, like any indicator.

Keep Learning

OBV shows the direction of volume flow. To see where volume traded, read our guide to Volume Profile, and for a volume-weighted price line, see the VWAP indicator. To compare OBV divergence with momentum divergence on RSI and MACD, read our guide to divergence trading. See how OBV fits with VWAP and Volume Profile in our Volume Indicators guide.

Want practical indicator guides in your inbox? Join the IndicatorHQ newsletter. Subscribers will also get our free Indicator Settings Cheat Sheet when it launches.


How we checked this guide

  • Method: Running-total example verified in code
  • Chart: Real TradingView data, Microsoft (MSFT) daily, at least 30 days old
  • Repainting: Does not repaint on closed bars

See how we test indicators →

Risk disclaimer: This article is for educational purposes only and is not investment advice. Microsoft is used only as a chart example; this is not a recommendation to buy or sell it. The strategies show how OBV can be used; they are not trading signals. Trading in stocks, derivatives, forex and crypto involves a substantial risk of loss and is not suitable for everyone. Consider speaking to a SEBI-registered investment adviser (or a licensed adviser in your country) before making trading decisions. See our full Disclaimer.