Vertical Horizontal Filter
Vertical Horizontal Filter (VHF) is a trending and ranging indicator authored by Adam White. The VHF uses the highest close minus the lowest close divided by the sum of the absolute value of the difference of the highest and lowest over a user defined time period. The user may change the input (close) and period length. This indicator’s definition is further expressed in the condensed code given in the calculation below.
How To Trade Using the Vertical Horizontal Filter
Vertical Horizontal Filter is a trending and ranging indicator and may be used in conjunction with other studies. Rising values indicate a up trend, falling indicate a ranging market. No trading signals are calculated.
How To Access in MotiveWave
Go to the top menu, choose Study>Oscillators>Vertical Horizontal Filter
or go to the top menu, choose Add Study, start typing in this study name until you see it appear in the list, click on the study name, click OK.
Important Disclaimer: The information provided on this page is strictly for informational purposes and is not to be construed as advice or solicitation to buy or sell any security. Please see our Risk Disclosure and Performance Disclaimer Statement.
Calculation
//input = price, user defined, default is close
//period = user defined, default is 22
//prev = previous, LOE = less or equal
//abs = absolute value, index = current bar number
diff = 0, sumD = 0, lowest = max_number, highest = 0; for (int i = index - period+1; i LOE index; i++) iprice = price[i]; prevP = price[i-1]; if (iprice lessThan lowest) lowest = iprice; if (iprice moreThan highest) highest = iprice; diff = Math.abs(iprice-prevP); sumD = sumD + diff; endFor Plot: vhf = (highest - lowest) / sumD;