powered by
The DV Intermediate oscillator (DVI) is a very smooth momentum oscillator that can also be used as a trend indicator. Created by David Varadi.
DVI(price, n = 252, wts = c(0.8, 0.2), smooth = 3, magnitude = c(5, 100, 5), stretch = c(10, 100, 2), exact.multiplier = 1)
Price series that is coercible to xts or matrix.
Number of periods for the percent rank.
The weight given to the smoothed returns (magnitude) component and the up/down days (stretch) component, respectively.
The number of periods to smooth price.
A set of 3 periods used to smooth magnitude.
A set of 3 periods used to smooth stretch.
The weight applied to identical values in the window. See runPercentRank.
runPercentRank
A object of the same class as price or a vector (if try.xts fails) containing the DVI values.
price
try.xts
The DVI combines smoothed returns over different time windows and the relative number of up versus down days (stretch) over different time windows.
The following site(s) were used to code/document this indicator: http://cssanalytics.wordpress.com/2009/12/13/what-is-the-dvi/ http://marketsci.wordpress.com/2010/07/27/css-analytics%E2%80%99-dvi-indicator-revealed/
# NOT RUN { data(ttrc) dvi <- DVI(ttrc[,"Close"]) # }
Run the code above in your browser using DataLab