On Balance Volume (OBV)

In the last article of our MasterClass on Volume Indicators, we talked about the essential concepts of “volume” and the different ways in which volume is used to derive valuable insights about the market sentiment. Checkout the last article if you haven’t already. In this article we’re going to talk about one of the most popular volume indicators, the On Balance Volume or OBV. We’re going the cover the following topics in detail with description on charts and implementation on Mudrex Strategy Canvas wherever necessary:

  1. Introduction to OBV
  2. Calculation
  3. Interpretations
  4. Using the Volume Block on Mudrex
  5. Making your own auto-trading bot

Introduction

On Balance Volume (OBV) measures buying and selling pressure as a cumulative indicator, adding volume on up days and subtracting it on down days. It was one of the first indicators to measure positive and negative volume flow. It is a technical trading momentum indicator that uses volume flow to predict changes in stock price. Chartists believe that when volume increases sharply without a significant change in the stock’s price, the price will eventually jump upward or fall downward.

OBV Chart

Just like price is to security, OBV is to volume. Magnitude of OBV has no physical meaning of it’s own. Different securities have different ranges of traded volumes per day and the OBV of two securities cannot be compared. The only useful interpretation of OBV is it’s overall trend i.e. rising or falling.

Calculation 

The On Balance Volume (OBV) line is simply a running total of positive and negative volume. A period’s volume is positive when the close is above the prior close and is negative when the close is below the prior close.

  • If the current closing price is above the prior close price then: 
    Current OBV = Previous OBV + Current Volume
  • If the current closing price is below the prior close price then: 
    Current OBV = Previous OBV – Current Volume
  • If the current closing price is equals the prior close price then: 
    Current OBV = Previous OBV (no change)

It is basically the direct sum of volume bars at the bottom of the candlestick charts where green bars are considered as positive volume whereas red bars are considered as negative volume.

Interpretations

  1. Trend Confirmation: Joe Granville, the creator of OBV, theorized that volume precedes price. OBV rises when volume on up days outpaces volume on down days. OBV falls when volume on down days is stronger. A rising OBV reflects positive volume pressure that can lead to higher prices. Conversely, falling OBV reflects negative volume pressure that can foreshadow lower prices. 
  1. Institutional Investors: The theory is that smart money or institutional investors can be seen flowing into security by a rising OBV. When the public then moves into the security, both the security and the On Balance Volume will surge ahead.
  1. Trend Reversal: It is believed that OBV would often move before price. If OBV is rising while prices are either flat or moving down, expect a trend reversal from downtrend to uptrend i.e. prices should move higher. If OBV is falling while prices are either flat or moving up, a trend reversal from uptrend to downtrend i.e. prices should move lower.
  1. Divergences: A bullish divergence forms when OBV moves higher or forms a higher low even as prices move lower or forge a lower low. A bearish divergence forms when OBV moves lower or forms a lower low even as prices move higher or forge a higher high. The divergence between OBV and price should alert chartists that a price reversal could be in the making.
  1. Breakout: As price and volume keep on rising together, there seems to be no problem but a time will come where we will see that price could not breach the previous top, but OBV line has breached the previous top. This is called an advanced breakout. It shows that although the price has gone up marginally volume generation is so high that OBV has made an advanced breakout. This is the signal which tells us that the price will also cross the previous top.

All in all:

  • a new high in the OBV indicates that buyers are stronger than sellers, and the price is likely to increase.
  • a new low in the OBV indicates that sellers are stronger than buyers, and the price is likely to decrease
  • when OBV increases or decreases in tandem with the price, the underlying trend is confirmed
  • when OBV increases or decrease opposite to the price, the underlying trend is bound for reversal
Uptrend supported by falling OBV Line
Downtrend supported by falling OBV Line

Building on Mudrex

OBV is a simple summation and thus does not have any parameters of its own. Also, since the absolute value of OBV does not have its own meaning, it cannot be used to make a trading strategy of its own. Instead, traders like to take the moving averages of the OBV line (instead of price line) and use them for trend confirmation or filtering false signals while generating buy/sell signals from a different price-based indicator trading strategy.

OBV Indicator block on Mudrex looks like this:

You can use a compare value in place of 0123 in the range of the cryptocurrency’s traded volume. However, comparison of OBV with a fixed value of traded volume isn’t much of a help.

Instead of this, we will be using the “Volume Block” on Mudrex for trend confirmation and false signal filtering. For the sake of standardisation, we’ll be using look-back periods similar to that of MACD (12, 26) for trend confirmation as shown:

Uptrend can be anticipated when Avg. vol of 12 candles is greater than Avg. vol of 26 candles:

Downtrend can be anticipated when Avg. vol of 12 candles is lesser than Avg. vol of 26 candles:

When the shorter MA volume is greater than the longer MA volume, only look for going long in your price-based trading strategy. On the other hand, when the shorter MA volume is smaller than the longer MA volume, only look for going short in your price-based trading strategy.

A simple example of using the above for false signal filtering in a MACD Signal Line Crossover strategy is as follows.

Buy when:

  1. 12-Volume Avg. > 26-Volume Avg.
  2. MACD Line crosses up Signal Line

Sell when:

  1. 12-Volume Avg. < 26-Volume Avg.
  2. MACD Line crosses down Signal Line

Overall strategy looks somewhat like this:

False Signal Filtering using On Balance Volume 

This can be done with any trading strategy of your choice and tested on historical data by performing backtests on Mudrex. By now, I hope you are convinced about the leading powers of the OBV. Yes, OBV is an important leading indicator, able to precede the price movements of a security/stock due to its predictive qualities. While lagging indicators (RSI, Stochastic Oscillator, moving averages, Bollinger Bands, CCI etc.) follow price movements and don’t have reliable predictive qualities, a leading indicator like OBV is able to anticipate when major moves in the markets would occur.

A lot more interesting things can be done using other volume indicators available on Mudrex. Next up, we’ll be talking about the Volume Weighted Average Price (VWAP) indicator and building your own auto-trading bot using the same, only on Mudrex.

Stay tuned!

Links

A few quick references below: