Is volume confirming the move? On-balance volume and relative volume
Short answerVolume confirms a price move when more trading goes with the move than against it, or when the move comes on clearly more volume than usual. On-balance volume (OBV) checks the first: a running total that adds a bar's volume when the close rises and subtracts it when the close falls. Relative volume checks the second: a bar's volume divided by its recent average, so 2.0 means twice the usual. In this lesson's designed example, price closes 3.1% above its day-31 peak while OBV stays below its own. Neither predicts the next move, one huge bar can distort both, and on intraday stock charts relative volume needs bars from the same time of day.
A price move shows which side won, not how many traders took part. OBV and relative volume let you check whether a rally drew heavy, rising volume or drifted up on thin trading, so you do not read a new high on fading volume as proof of broad buying.
Valmy noteValmy's v1 strategy language includes the simple moving average and no other indicator, so on-balance volume and relative volume are taught here for reading charts (as of 26 November 2026).
On-balance volume (OBV): a running total of up-day and down-day volume#
On-balance volume (OBV) measures whether volume is flowing in the direction of price by keeping a running total of volume: it adds a bar's whole volume when the bar closes above the previous close, subtracts it when the bar closes below, and leaves the total unchanged when the close is the same. Its inputs are the close and the volume. Its units are the volume units of the chart, such as shares for a stock or coins for a crypto pair. It has no lookback length or settings. Joseph Granville presented it in his 1963 book Granville's New Key to Stock Market Profits. The starting value is arbitrary, so the level of OBV means nothing on its own. Traders read its direction and compare its highs and lows with the highs and lows of price.
This lesson starts OBV at 0 on the first bar. The TA-Lib library starts it at the first bar's volume instead. That shifts the whole line by a constant and does not change its shape, which is why only the direction matters.
Calculating OBV step by step#
OBV adds the bar's volume after a higher close, subtracts it after a lower close and carries the previous total after an unchanged close. The table shows seven synthetic daily bars (synthetic data). Volume is in shares.
| Day | Close | Change vs previous close | Volume | Added to OBV | OBV |
|---|---|---|---|---|---|
| 1 | 50.00 | (start) | 1,000 | 0 | 0 |
| 2 | 50.50 | up | 1,200 | +1,200 | 1,200 |
| 3 | 50.30 | down | 800 | −800 | 400 |
| 4 | 50.30 | unchanged | 900 | 0 | 400 |
| 5 | 51.00 | up | 1,500 | +1,500 | 1,900 |
| 6 | 50.80 | down | 700 | −700 | 1,200 |
| 7 | 51.20 | up | 1,100 | +1,100 | 2,300 |
- Day 2 closes above day 1, so its 1,200 shares are added: 0 + 1,200 = 1,200.
- Day 3 closes lower, so its 800 shares are subtracted: 1,200 − 800 = 400.
- Day 4 closes exactly where day 3 did, so OBV stays at 400 even though 900 shares traded.
- Continuing the same way, OBV ends at 2,300 on day 7.
Over the week, price rose 2.4%, from 50.00 to 51.20. Up days traded 1,200 + 1,500 + 1,100 = 3,800 shares and down days 800 + 700 = 1,500 shares, so OBV rose too. Had OBV started at the first day's volume, as in TA-Lib, every value would be 1,000 higher and the final value would be 3,300. The rise of 2,300 would be the same.
Notice what OBV ignores. It does not care how far price moved. A close up by 0.01 adds the whole day's volume, exactly like a close up by 5.00.
Reading OBV on a chart#
When price and OBV rise together, volume is confirming the rally: more shares are changing hands on up days than on down days. When price makes a new high but OBV does not, the reading is called a divergence: price is still rising, but the up days are drawing relatively less volume than before. Granville's idea, as summarized by StockCharts, was that volume tends to lead price. A divergence is a warning to look closer, not a sell signal. Figure 1 was designed to show one.
- A, day 31. Price closes at 62.02 after a steady rally. OBV peaks at the same time, at 26.7 million shares. During the rally from day 2 to day 31, up days traded 36.3 million shares and down days 9.6 million, so OBV climbed with price.
- B, day 59. After a pullback that took OBV down to 18.3 million, price climbs to a higher close of 63.97, 3.1% above A. OBV reaches only 19.8 million on that day, and its best level in the second rally, 23.5 million on day 48, is still below A. In the second rally, from day 42 to day 59, up days traded 9.4 million shares and down days 7.9 million: a much narrower margin than the first rally's.
- C, day 81. Price falls to 54.31, 15.1% below B.
The data were built to make this divergence work. In real markets, many divergences are followed by further gains, and OBV can stay below a prior peak for months while price keeps rising. Use the divergence as one piece of evidence, together with price structure and your own exit plan.
When OBV misleads#
OBV can mislead because it gives every bar's whole volume to the direction of its close, no matter how small the price change was. One unusually large bar can therefore move OBV more than weeks of ordinary trading, and the line can stay distorted for as long as you look at it, because OBV is a running total and never forgets. StockCharts' guide to OBV warns that volume spikes can throw off the indicator. Figure 2 was designed to show this.
- A, day 31. A bar closes at 25.29, one cent above the previous close of 25.28, on 5,000,000 shares. The 20-day average before it was about 463,000 shares, so this bar traded 10.8 times the usual volume. A day like this can come from an index rebalance, a large block trade or an options expiry. Because the close was higher by one cent, all 5,000,000 shares count as "up" volume, and OBV jumps from −2.4 million to +2.6 million.
- B, day 61. Price has drifted down to 24.23, 4.2% below its day 30 close. OBV has fallen back to 0.6 million, but it is still 2.9 million shares above its level before the spike and never returned below it. A trader reading OBV alone would see "accumulation" in a market that went down.
Two other weak points are worth knowing:
- Ties and tiny moves decide everything. A close that is unchanged adds nothing, even on huge volume, and a close that differs by one tick adds everything. On instruments that trade in coarse price steps, many closes are unchanged.
- The level means nothing across charts. Two platforms can show different OBV values for the same market because they start counting on different days or at different values. Compare directions and divergences, not levels.
OBV on stock charts and crypto charts#
OBV works the same way on any market that reports volume, but the volume behind it differs. A stock chart counts shares. A crypto chart can count either the base asset, such as BTC in a BTC/USDT pair, or the quote asset, such as USDT. Binance's candle data includes both a base volume and a quote asset volume. Use base volume for OBV unless the platform says otherwise, and keep it consistent across charts. A crypto chart's volume usually comes from a single exchange, so its OBV describes trading on that venue only. The section on relative volume below explains why that matters. A market with no reliable volume, such as an index level that is calculated rather than traded, has no OBV at all.
Relative volume: today's volume compared with normal#
Relative volume measures how unusual a bar's volume is by dividing it by the average volume of the bars before it. A value of 1.0 means normal, 2.0 means twice the usual volume and 0.5 means half. Its input is volume only. It has no units, because it is a ratio. A common setting is a 20-bar average that excludes the current bar, which is the default of the TA-Lib library's RVOL function, and this lesson uses that variant. No single creator is credited. On intraday stock charts, a second version compares each bar with the same time of day on earlier sessions, because stock volume follows a daily pattern.
Relative volume answers the question "is this move drawing more participants than usual?" A breakout, a sharp drop or a news reaction on relative volume of 3.0 involved far more trading than a normal bar. The same move on 0.6 drew less than usual.
Calculating relative volume step by step#
Relative volume = this bar's volume ÷ the average volume of the previous n bars. To keep the arithmetic short, this example uses a 5-bar average instead of 20 (synthetic data). Volume is in shares.
| Day | Volume | Average of the previous 5 days | Relative volume |
|---|---|---|---|
| 1 | 1,000 | ||
| 2 | 1,200 | ||
| 3 | 900 | ||
| 4 | 1,100 | ||
| 5 | 800 | ||
| 6 | 2,500 | 1,000 | 2.50 |
| 7 | 1,000 | 1,300 | 0.77 |
- On day 6, the previous five days add up to 1,000 + 1,200 + 900 + 1,100 + 800 = 5,000 shares, an average of 1,000. Relative volume is 2,500 ÷ 1,000 = 2.50.
- On day 7, the previous five days are days 2 to 6: 1,200 + 900 + 1,100 + 800 + 2,500 = 6,500, an average of 1,300. Relative volume is 1,000 ÷ 1,300 ≈ 0.77.
Day 7 traded a perfectly normal 1,000 shares, yet it reads as quiet because day 6's spike now sits inside the average. If day 6 had traded 1,000 shares, day 7's relative volume would have been 1.00. A big day lifts the baseline for the next n bars.
Relative volume by time of day on an intraday stock chart#
On an intraday stock chart, relative volume should compare each bar with the same time slot on earlier sessions, because stock volume is heavy at the open, light at midday and heavy again before the close. Madhavan (2002) shows this U shape in half-hour volume for Microsoft stock from April to July 2001. A plain relative volume against the previous 20 five-minute bars compares the 09:30 bar with the quiet bars before it and reports "unusual" almost every morning.
The time-of-day version divides a bar's volume by the average volume of the same slot, for example 09:30 to 09:35, over the previous 20 sessions. Suppose today's 09:30 bar trades 60,000 shares:
- The previous 20 five-minute bars averaged 20,000 shares, so plain relative volume = 60,000 ÷ 20,000 = 3.0.
- The 09:30 bar averaged 50,000 shares over the previous 20 sessions, so time-of-day relative volume = 60,000 ÷ 50,000 = 1.2.
The open was only 20% busier than a normal open. TradingView offers this kind of measure as "Relative Volume at Time", and its default mode compares running (cumulative) volume since the start of the period rather than single bars, so values differ between platforms. A 24-hour crypto pair has no opening bell, so its daily volume pattern lacks the same sharp open and close peaks, though activity can still vary by hour.
Reading relative volume on a chart#
Traders read relative volume as a measure of participation: a move on high relative volume involved many more trades than usual, and a move on low relative volume involved fewer. A breakout from a range on relative volume of 2.0 or more is commonly read as having real demand behind it. A move on less than 1.0 is commonly read as lacking interest. Both are readings, not rules. Figure 3 shows 20-day relative volume on synthetic daily candles. The first 20 days have no value because the average needs 20 earlier days.
- A, day 47. Price jumps 5.1% and closes at 31.53, above the range high of 31.42, on 2.58 million shares. That is a relative volume of 3.8: almost four times the usual volume confirms that many traders took part in the move.
- B, day 48. Price closes unchanged on a relative volume of 0.68. One reading is that interest faded the day after the jump. A competing reading is that a quiet pause, with no selling, shows that buyers who missed the move are not dumping it. The chart cannot settle which is right on that day. Part of the quiet reading is also arithmetic: day 47's 2.58 million shares now sit in the 20-day baseline, lifting it from about 687,000 to about 785,000 shares. Against the old baseline, day 48 would have read 0.77.
After the breakout, 8 of the next 19 days had relative volume above 1.0 while price trended higher. A rally does not need above-average volume every day to continue.
When relative volume misleads#
Relative volume misleads when the baseline is not a fair picture of "normal". Three cases come up often: comparing intraday bars across different times of day, letting one huge bar inflate the baseline, and judging a crypto market from a single exchange.
Wrong baseline on an intraday chart. Figure 4 shows one synthetic stock session after 20 earlier sessions. Volume was given the usual U shape, and a news headline was added at 12:30 that lifts price by 1.3% on heavy volume.
- A, 09:30. Against the previous 20 five-minute bars, the opening bar reads 3.0, which looks unusual. Against earlier opens it reads 1.4: a slightly busy, ordinary open.
- B, 12:30. The headline bar reads 2.8 on the plain measure and 3.2 on the time-of-day measure. Both versions agree that this is unusual, because midday is normally quiet.
- C, 15:45. The plain measure reads 2.3 as the closing rush begins. The time-of-day measure reads 1.3, close to a normal close.
Across the session, 7 bars reached 2.0 or more on the plain measure, but only 3 on the time-of-day measure, and those 3 were the headline bars at 12:30, 12:35 and 12:45. On 10 of the 19 earlier sessions with enough history, the plain measure gave the opening bar 2.0 or more although nothing special happened.
A huge bar inflates the baseline. As the hand example showed, one spike lifts the average for the next n bars, so normal bars after it read as quiet. Earnings days, index rebalances and expiry days create such spikes on stocks. Large liquidation cascades can do the same on crypto pairs.
One crypto exchange is a partial view. A crypto pair trades on many exchanges at once, and the volume on one chart usually comes from one of them. Makarov and Schoar (2020) documented that bitcoin traded on many exchanges at recurring price differences, so volume is spread across venues that do not move in lockstep. Relative volume on one exchange can rise because traders moved there, not because total interest rose. Reported volume can also be inflated: Cong, Li, Tang and Yang (2023) estimated that wash trading averaged over 70% of reported volume on the unregulated exchanges in their sample of 29 exchanges. A relative volume reading is only as good as the volume it divides.
A bar in progress is incomplete. Until a bar closes, its volume is still growing, so a live bar's relative volume understates the final value. TradingView's documentation for its Relative Volume at Time indicator notes this effect. Judge relative volume on closed bars.
Check your understanding: OBV and relative volume#
Question.
- A token's daily closes are 10.00, 10.20, 10.10, 10.11 and 10.40, with volumes of 3,000, 4,000, 2,000, 9,000 and 5,000 tokens. Starting OBV at 0, what is OBV after day 5? How much of it comes from day 4, and what would OBV be if day 4 had closed unchanged at 10.10?
- Using the average of the three days before it, what is day 4's relative volume?
- On a stock's five-minute chart, the 09:30 bar trades 90,000 shares. The previous 20 five-minute bars averaged 30,000 shares, and the 09:30 bar averaged 75,000 shares over the previous 20 sessions. What are the plain and time-of-day relative volumes, and which one should you trust?
Show the answers
Answer.
- OBV: day 1 is 0; day 2 closes higher, +4,000 = 4,000; day 3 lower, −2,000 = 2,000; day 4 higher by 0.01, +9,000 = 11,000; day 5 higher, +5,000 = 16,000. Day 4 contributed 9,000 of the 16,000, more than half, on a price change of one cent. Had day 4 closed unchanged, OBV would be 4,000 − 2,000 + 5,000 = 7,000. The direction of OBV is still up, but its size depends heavily on one tiny move.
- The three days before day 4 average (3,000 + 4,000 + 2,000) ÷ 3 = 3,000, so relative volume = 9,000 ÷ 3,000 = 3.0. Volume was three times normal on a day when price barely moved. That combination, heavy trading without progress, is worth a closer look, but it does not say which way the next move will go.
- Plain relative volume = 90,000 ÷ 30,000 = 3.0. Time-of-day relative volume = 90,000 ÷ 75,000 = 1.2. Trust the time-of-day version for an intraday stock chart: the open is always busy, so a fair comparison is with earlier opens. This open was 20% busier than usual, not three times.
Related lessons#
- Before this lesson: What does volume add to a price chart?
- Next: What changes when an indicator is weighted by volume? VWMA and the money flow index, What is VWAP, and why does it reset? and Is money flowing in or out? Accumulation/Distribution, Chaikin Money Flow and the Chaikin Oscillator
- See also: When does a breakout fail?, How much volume does it take to move price? Ease of Movement and the Force Index and What makes a market liquid, and why does it matter for my order?