Log in to see Cloud of Tags

Wealth-Lab Wiki


public OBV(Bars bars, string description) public static OBV Series(Bars bars)

Parameter Description

bars The Bars object


On Balance Volume developed by Joseph Granville and described in his New Key to Stock Market Profits, uses volume to gauge the strength of a market. If prices close up, the current bar's volume is added to OBV, and if prices close down, it is subtracted. The result is an indicator that depicts the flow of volume into and out of a security. It either confirms the quality of the current trend or warn of an impending reversals.

You can often spot divergences between price action and the OBV indicator. For example, if prices make a new high but the move is not accompanied by sufficient volume, OBV will fail to make a new high. Such divergences can be a sign that a trend is nearing completion.


The actual value of the OBV is unimportant, concentrate on its direction.

  • When both price and OBV are making higher peaks and higher troughs, the up trend is likely to continue.
  • When both price and OBV are making lower peaks and lower troughs, the down trend is likely to continue.
  • When price continues to make higher peaks and OBV fails to make higher peak, the up trend is likely to stall or fail.
  • When price continues to make lower troughs and OBV fails to make lower troughs, the down trend is likely to stall or fail.
  • If during a trading range, the OBV is rising then accumulation may be taking place and is a warning of an upward break out.
  • If during a trading range, the OBV is falling then distribution may be taking place and is a warning of an downward break out.


"...the total daily volume is added to a cumulative total whenever the price of a stock closes higher than the day before and it is subtracted whenever the price of the stock closes lower than the day before. On days when the stock closes unchanged in price, the running cumulative volume remains unchanged." (Granville, p. 144)


using System; using System.Collections.Generic; using System.Text; using System.Drawing; using WealthLab; using WealthLab.Indicators;

namespace WealthLab.Strategies { public class MyStrategy : WealthScript { protected override void Execute() { // This simple systems buys and sells based on a moving average crossover of OBV WealthLab.Indicators.EMACalculation m = WealthLab.Indicators.EMACalculation.Modern; DataSeries obv = OBV.Series( Bars ); DataSeries OBV1 = EMA.Series( obv, 24, m ); DataSeries OBV2 = EMA.Series( obv, 48, m );

for(int bar = 48*3; bar < Bars.Count; bar++) { if( CrossOver( bar, OBV1, OBV2 ) ) BuyAtMarket( bar+1 ); else if( CrossUnder( bar, OBV1, OBV2 ) ) SellAtMarket( bar+1, Position.AllPositions, "OBV" ); } ChartPane OBVPane = CreatePane( 40, false, true ); PlotSeries( OBVPane, obv, Color.Brown, WealthLab.LineStyle.Solid, 2 ); PlotSeries( OBVPane, OBV1, Color.Black, WealthLab.LineStyle.Dotted, 2 ); PlotSeries( OBVPane, OBV2, Color.Red, WealthLab.LineStyle.Dotted, 2 ); } } }

Important Disclaimer: The information provided by Wealth-Lab is strictly for informational purposes and is not to be construed as advice or solicitation to buy or sell any security.  The owner of Wealth-Lab.com assumes no liability resulting from the use of the material contained herein for investment purposes. By using this web site, you agree to the terms of this disclaimer and our Terms of Use.

ScrewTurn Wiki. Some of the icons created by FamFamFam.