The Amibroker OBV() function seems to use all available data in it's calculation.
Can the indicator use only the Visible bars, (or a range of bars?) and begin the calculation at the first bar?
This is a one year of OBV from Amibroker: start value is 536 Million. Amibroker
Basically, this is apparently the OBV indicator from think or swim platform: start value is around -11 million.
And this is the OBV from FreeStockCharts.com. OBV also starts around below 0
I believe other indicators (i.e. ACCDist()) may behave similarly.
If needed, using the .afl you may write your own OBV variation (following these simple rules) starting the accumulation from the first visible bar.
If the closing price is above the prior close price then:
Current OBV = Previous OBV + Current Volume
If the closing price is below the prior close price then:
Current OBV = Previous OBV - Current Volume
If the closing prices equals the prior close price then:
Current OBV = Previous OBV (no change)
Moreover, note this in the Interpretation section:
"The absolute value of OBV is not important. Chartists should instead focus on the characteristics of the OBV line. First, define the trend for OBV. Second, determine if the current trend matches the trend for the underlying security. Third, look for potential support or resistance levels. Once broken, the trend for OBV will change and these breaks can be used to generate signals. Also, notice that OBV is based on closing prices. "
By the way, I see that the 1963 book that originally described this indicator by its inventor Joseph E. Granville was recently reprinted (2011) and is available from online vendors (Amazon, AbeBooks, etc.)
Granville's New Key To Stock Market Profits Paperback (reprinted October 15, 2011) - Joseph E. Granville ISBN-13: 978-1258167981
There is only one rewiew on Amazon, but a very positive one calling it a "Timeless Classic" (5 stars).
@beppe Thank you for the suggestions. My desire is to look at charts in over different date ranges. A (e.g. a T (AT&T) )three year trend could be much different than a previous 1 year trend), and to have the OBV() and other indicators match my time frames.
All cumulative indicators by definition use accumulation of previous bars. If you want to start with first visible bar, you can just subtract the first visible value:
The curve will be the same (only the value will change). So, maybe some chart sites reset the value to zero at a certain date, but as I quoted above the the absolute value of OBV is not important.