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.
A object of the same class as price
or a vector (if
try.xts
fails) containing the VHF values.
The VHF is calculated by subtracting the n
-period lowest low from the
n
-period highest high and dividing that result by the n
-period
rolling sum of the close price changes.
The following site(s) were used to code/document this indicator: http://www.metastock.com/Customer/Resources/TAAZ/#119
See aroon
, CCI
, ADX
,
TDI
, GMMA
for other indicators that measure trend
direction/strength.
# NOT RUN {
data(ttrc)
vhf.close <- VHF(ttrc[,"Close"])
vhf.hilow <- VHF(ttrc[,c("High","Low","Close")])
# }
Run the code above in your browser using DataLab