vhf#
- vhf(close, length=None, drift=None, offset=None, **kwargs)[source]#
Vertical Horizontal Filter (VHF)
VHF was created by Adam White to identify trending and ranging markets.
- Sources:
https://www.incrediblecharts.com/indicators/vertical_horizontal_filter.php
- Calculation:
- Default Inputs:
length = 28
HCP = Highest Close Price in Period LCP = Lowest Close Price in Period Change = abs(Ct - Ct-1) VHF = (HCP - LCP) / RollingSum[length] of Change
- Args:
source (pd.Series): Series of prices (usually close). length (int): The period length. Default: 28 offset (int): How many periods to offset the result. Default: 0
- Kwargs:
fillna (value, optional): pd.DataFrame.fillna(value) fill_method (value, optional): Type of fill method
- Returns:
pd.Series: New feature generated.