Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

VHF

Vertical Horizontal Filter


Description

The Vertical Horizontal Filter (VHF) attempts to identify starting and ending trends. Developed by Adam White.

Usage

VHF(price, n = 28)

Arguments

price

Object that is coercible to xts or matrix and contains a Close price series, or a High-Low-Close price series.

n

Number of periods to use.

Details

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.

Value

A object of the same class as price or a vector (if try.xts fails) containing the VHF values.

Note

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).

Author(s)

Joshua Ulrich

References

The following site(s) were used to code/document this indicator:
https://www.metastock.com/Customer/Resources/TAAZ/#119

See Also

See aroon, CCI, ADX, TDI, GMMA for other indicators that measure trend direction/strength.

Examples

data(ttrc)
vhf.close <- VHF(ttrc[,"Close"])
vhf.hilow <- VHF(ttrc[,c("High","Low","Close")])

TTR

Technical Trading Rules

v0.24.2
GPL (>= 2)
Authors
Joshua Ulrich
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.