What it measures
Most pages in this school use prices alone. On-balance volume brings in a second column of figures: how much was traded in each bar. It asks one question of each bar, whether it closed up or down, and then moves the bar’s entire volume to one side of the ledger or the other.
Joseph Granville set it out in 1963, in Granville’s New Key to Stock Market Profits. His claim was that volume moves before price does. That is a claim, and the line does not depend on it: OBV is a record of which way the close went on the bars that had the most volume.
The level of the line means nothing. The total starts wherever the chart’s history starts, so two programs with different amounts of history show different numbers for the same bar. Only the shape matters: whether the line has been rising, falling or going sideways, and whether it has done so in step with the price.
The line is only as good as the volume under it. Shares and futures trade on exchanges that publish how much changed hands. Spot foreign exchange has no central exchange and no such record: the ‘volume’ on a currency chart is tick volume, a count of how many times the price from one broker’s feed changed during the bar. More is said about that below.
How it is calculated, step by step
- 01
Start the total somewhere.
Zero is usual, at the first bar. The choice changes every number that follows by the same amount and changes the shape of the line not at all.
- 02
Compare each close with the close before.
Only the direction is used. A rise of 0.01 and a rise of 10 are treated alike.
- 03
If the close is higher, add the bar’s volume.
OBV = previous OBV + volume.
- 04
If the close is lower, take it away.
OBV = previous OBV − volume.
- 05
If the close is the same, leave the total alone.
OBV = previous OBV. The bar’s volume is not counted at all.
- 06
Optionally, average it.
A simple moving average of OBV over N bars is often drawn beside it, to make its direction easier to see. It is the one setting on this page’s chart.
The arithmetic is the same in every program; what differs is the starting bar, and therefore the level, and the volume itself. On a currency pair two brokers count different ticks and draw different OBV lines for the same market. On this page the volume is invented along with the prices and is in no unit.
A worked example, by hand
Five bars. Closes: 10, 11, 11, 10, 12. Volumes: 100, 150, 120, 200, 180.
- Bar 1: there is no close before it, so OBV starts at 0
- Bar 2: 11 is above 10, so add its volume: 0 + 150 = 150
- Bar 3: 11 is the same as 11, so nothing changes: 150
- Bar 4: 10 is below 11, so take its volume away: 150 − 200 = −50
- Bar 5: 12 is above 10, so add its volume: −50 + 180 = 130
Bar 4 fell by 1 and all 200 of its volume was taken away; it would have been the same had it fallen by 0.01. Bar 3’s volume of 120 was not counted at all. OBV is a blunt instrument, and it is meant to be.
The numbers in this example were chosen to be easy to add up. They are not prices of anything.
How people read it
- Its direction beside the price’s. A rising price with a rising OBV is described as a move that volume has gone along with: the up-bars have carried more volume than the down-bars.
- Divergence. The price makes a new high and OBV does not, or the mirror image. It is read as a move that volume has stopped supporting. It is clearer afterwards than at the time, and it is often followed by nothing.
- A break in OBV. Some readers draw levels and trend lines on the OBV line itself and watch for it to pass them before the price passes its own.
- Against its average. OBV above its own moving average has been rising faster than it had been.
What it cannot tell you
- It cannot weigh a bar. A close that is higher by the smallest possible amount adds the whole volume, exactly as a large rise would. A bar that ranged widely and closed unchanged adds nothing.
- It cannot tell buying from selling. Every unit of volume is a purchase and a sale at once. OBV assigns the bar’s volume to one side by the direction of its close, which is a convention, not a measurement.
- It cannot give a level that means anything. The figure depends on where the total began.
- It cannot measure traded volume in spot forex. There the input is tick volume: a count of price changes on one broker’s feed. A busy market does produce more price changes, but a count of changes is not an amount traded, a single very large deal can be one tick, and another broker’s count for the same bar will differ. OBV on a currency pair is a running total of how often that feed’s price moved on up-bars less how often on down-bars.
- It cannot recover from one odd bar. A single bar with unusual volume shifts the line by that amount for the rest of the chart.
Common mistakes
- Reading the number. An OBV of 2,000,000 on one chart and 50,000 on another says nothing about either.
- Treating forex tick volume as if it were the volume of the market. It is one feed’s count of quotes.
- Taking a divergence as a signal with a known outcome. Divergences are found on every chart, most easily after the event.
- Comparing OBV across time frames or instruments. The totals are built from different bars and different volumes.
- Forgetting that the line is half made of price. When the price rises for many bars OBV must rise too, whatever the volume was: every one of those bars is added.
Questions people ask
- How is on-balance volume calculated?
- Start a total at zero. For each bar, compare its close with the previous close: if it is higher, add the bar’s volume to the total; if it is lower, subtract it; if it is the same, leave the total unchanged. The running total, drawn as a line, is OBV.
- Does OBV work in forex?
- The arithmetic can be done, but on a different input. Spot foreign exchange is traded between banks and dealers with no central exchange, so there is no published figure for how much was traded in a bar. Charting platforms show tick volume instead: the number of price changes on that broker’s feed. OBV built on it adds up counts of quotes, not amounts traded, and differs from broker to broker. Exchange-traded currency futures do report traded volume.
- Why is my OBV value different from another chart’s?
- Because OBV is a running total, its value depends on the bar at which the total began. A chart with more history loaded starts earlier and shows a different number for the same bar. The shape of the line over the bars the two charts share is the same, provided they use the same volume.
- What is OBV divergence?
- The price and OBV moving out of step: for example, the price makes a higher high while OBV makes a lower one. It is read as a rise that less volume is going along with. It describes the bars so far; what follows can be a fall, a pause or a further rise.
The words on this page
An indicator is arithmetic on prices that have already happened. It describes what a price did; it does not predict what a price will do. The chart on this page is invented: a seeded random walk, not a market. This page is an explanation for study. It is not advice, a recommendation or a forecast, and nothing an indicator shows says anything certain about what a price will do next.
