On-balance volume (OBV) is a running total of daily volume, with volume on an up day added and volume on a down day subtracted. An up day is a close higher than the previous day’s close, and vice versa a down day. So if p1 is today’s close and p2 is yesterday’s, the formula is simply
/ v1 if p1 > p2 | OBV = OBVprev + | 0 if p1 = p2 | \ - v1 if p1 > p2
The starting point (ie. the zero point) for the running total is arbitrary. In Chart it’s merely the segment of data first displayed.
See also Price and Volume Trend, and Accumulation/Distribution, which accumulate volume in similar ways.
Copyright 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2014, 2015, 2016, 2017 Kevin Ryde
Chart is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version.