The Vertical Horizontal Filter (VHF) attempts to identify starting and ending trends. Developed by Adam White.
VHF(price, n = 28)
Object that is coercible to xts or matrix and contains a Close price series, or a High-Low-Close price series.
Number of periods to use.
The VHF is calculated by subtracting the
n-period lowest low from the
n-period highest high and dividing that result by the
rolling sum of the close price changes.
A object of the same class as
price or a vector (if
try.xts fails) containing the VHF values.
If Close prices are given, the function calculates the max/min using only those prices (the default). If HLC prices are given, the function calculates the max/min using the high/low prices (added for flexibility).
The following site(s) were used to code/document this
1 2 3
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.