Vertical Horizontal Filter(VHF指标计算公式):
To calculate the Vertical Horizontal Filter:
Vary the number of periods in the Vertical Horizontal Filter to suit different time frames. White originally recommended 28 days but now prefers an 18-day window smoothed with a 6-day moving average.
Determine the highest closing price (HCP) in n periods.
Determine the lowest closing price (LCP) in n periods.
Calculate the range of closing prices in n periods:
HCP - LCP
Next, calculate the movement in closing price for each period:
Closing price [today] - Closing price [yesterday]
Add up all price movements for n periods, disregarding whether they are up or down:
Sum of absolute values of ( Close [today] - Close [yesterday] ) for n periods
Divide Step 4 by Step 6:
VHF = (HCP - LCP) / (Sum of absolute values for n periods)
VHF(Vertical Horizontal Filter)十字過濾線
算法:
先計算N日來最高收盤價與最低收盤價的差,統計N日內今收與昨收的差的累加和,二者的比值即為VHF。
參數: N 統計天數 一般為28
計算公式
(HHV(CLOSE,N)-LLV(CLOSE,N))/SUM(ABS(CLOSE-REF(CLOSE,1)),N)