---
title: "Vertical Horizontal Filter: Formula"
description: "Adam White's VHF measures whether price is trending or moving sideways by dividing the range of closing prices over a window by the total distance price..."
canonical: https://www.getswoopr.com/indicators/trend/vertical-horizontal-filter/
source: "Swoopr Investment: https://www.getswoopr.com"
---

## Direct Answer



> Adam White's VHF measures whether price is trending or moving sideways by dividing the range of closing prices over a window by the total distance price traveled bar to bar. Higher values show a stronger trend phase. Higher VHF values mean price moved efficiently in one direction, characteristic of a trend, and lower values mean much back-and-forth, characteristic of a range.





      


# Vertical Horizontal Filter: Formula, Meaning, Signals, Examples and How to Use It



## How Is Vertical Horizontal Filter Calculated?

Adam White's VHF measures whether price is trending or moving sideways by dividing the range of closing prices over a window by the total distance price traveled bar to bar. Higher values show a stronger trend phase.

**Formula:** `VHF = (Highest Close(n) - Lowest Close(n)) / Sum(|Close(i) - Close(i-1)|) over n bars`

**Inputs:**

- Closing prices
- Lookback n (28 is a commonly used value)

**Worked example.** With closes spanning 100 to 110 and total bar-to-bar movement of 40, the VHF is 0.25. The inputs are illustrative numbers, not market data.

**Reading it.** Higher VHF values mean price moved efficiently in one direction, characteristic of a trend, and lower values mean much back-and-forth, characteristic of a range. It signals the type of market, not its direction.

**Limits.** It carries no direction and the trending versus ranging boundary has to be chosen by the user. It is a lagging state measure over the lookback window.


      

## What is Vertical Horizontal Filter?



Adam White's VHF measures whether price is trending or moving sideways by dividing the range of closing prices over a window by the total distance price traveled bar to bar. Higher values show a stronger trend phase.




## How to use Vertical Horizontal Filter



Higher VHF values mean price moved efficiently in one direction, characteristic of a trend, and lower values mean much back-and-forth, characteristic of a range. It signals the type of market, not its direction. A reading alone is never a buy or sell signal; it needs context from price structure, volume, volatility and the broader market regime.




## Strengths



- Dividing net range by total path length gives an efficiency-style ratio, so a straight move gives a value near 1 and a back-and-forth one is much lower.
- Using closes only means the filter needs one price series and no volume or range data.
- Reproducible when the formula and data convention are fixed.




## Weaknesses and limitations



- A single large one-way day can raise the numerator and push the reading up even when the rest of the window was a range.
- Path length sums every bar-to-bar move, so noisy data with many small moves lowers the ratio even when the net direction is clear.
- Correlated indicators can create false confidence by repeating the same underlying information.




## Editorial and risk note



This page is educational content, not individualized investment advice. It should not imply guaranteed prediction, accuracy or outperformance.







## Frequently Asked Questions


        



Is Vertical Horizontal Filter a buy or sell signal?




No. Higher VHF values mean price moved efficiently in one direction, characteristic of a trend, and lower values mean much back-and-forth, characteristic of a range. It carries no direction and the trending versus ranging boundary has to be chosen by the user. A trade built on it still needs a trigger, an invalidation rule, a position size and realistic execution assumptions.










What is the best setting for Vertical Horizontal Filter?




Vertical Horizontal Filter takes these inputs: closing prices; lookback n (28 is a commonly used value). There is no universal best setting for the tunable ones, so test them across instruments, regimes and out-of-sample periods and favor stable parameter regions over one historical winner.










Can Vertical Horizontal Filter be used by itself?




It carries no direction and the trending versus ranging boundary has to be chosen by the user. It is a lagging state measure over the lookback window. For that reason it is read next to measures of direction, participation, valuation, liquidity and risk, not alone.










Does Vertical Horizontal Filter work on every timeframe?




The calculation (VHF = (Highest Close(n) - Lowest Close(n)) / Sum(|Close(i) - Close(i-1)|) over n bars) can be run on any bar size, but behavior is not portable: a reading on a five-minute chart describes a very different market window from the same reading on a daily chart. Validate the exact timeframe before relying on it.










Why does Vertical Horizontal Filter give false signals?




A single large one-way day can raise the numerator and push the reading up even when the rest of the window was a range. Path length sums every bar-to-bar move, so noisy data with many small moves lowers the ratio even when the net direction is clear. Lag, noise and regime changes add to this, because market participants react to new information after the reading is calculated.










How should Vertical Horizontal Filter be backtested?




Rebuild Vertical Horizontal Filter from closing prices using point-in-time data, write the rules before testing, include delisted securities where relevant, model realistic fills and costs, reserve a validation sample and compare with a simpler baseline.












S




Swoopr Editorial Team



The Swoopr Editorial Team produces independent investment education, research, and tools for understanding markets, evaluating opportunities, and managing risk. All content is educational only and does not constitute personalized investment advice.



See our [editorial policy](https://www.getswoopr.com/legal/editorial-policy/) and [corrections policy](https://www.getswoopr.com/legal/corrections-policy/).
