# Vertical Horizontal Filter

Plots the Vertical Horizontal Filter (the spread of the window's closes divided by total close-to-close travel over 28 bars) and reads it against its own history via a 28-period SMA basis or a percentile, since the ratio has no universal threshold. Line and fill color by regime, a label names the current state, and four alerts cover basis crosses and slope turns.

- Indicator in the LuxAlgo Library, by LuxAlgo, published May 13, 2026.
- Access: free.
- Concepts: [Vertical Horizontal Filter](https://www.luxalgo.com/library/concept/vertical-horizontal-filter/) (primary)
- Open on Vela: https://vela.luxalgo.com/chart?pineScriptCodeId=hokfz40ayl0g6ek7ryjdlrob
- Page: https://www.luxalgo.com/library/indicator/vertical-horizontal-filter/

**Vertical Horizontal Filter** answers the routing question (is this market trending at all?) with a transparent ratio and a regime engine on top. The [vertical horizontal filter](https://www.luxalgo.com/library/concept/vertical-horizontal-filter/) divides the spread between the window's highest and lowest close by the total absolute close-to-close travel inside it: straight-line markets score high, churn scores low. Because the raw level carries no universal threshold, this build reads the VHF against its own recent history (a moving average of itself, or a percentile taken over its recent window) and prints the verdict as a label at the line's tip.

## How to Trade the Vertical Horizontal Filter?

- **Above the basis**: directional movement dominates the window. Give trend-following tools the benefit of the doubt; the Trending Regime Start alert fires on the cross.
- **Below the basis**: travel without progress. Mean-reversion tactics are favored, alerted as Ranging Regime Start.
- **Slope turns**: a rising VHF flags trend development regardless of absolute level, with Turned Rising and Turned Falling alerts.
- **Direction-blind by design**: colors describe trendiness, never bullishness; pair the regime with a directional tool for sides.

## Vertical Horizontal Filter Settings

- **Length** (default 28): the lookback window; shorter flips regimes faster with more false transitions.
- **Numerator Extremes** (default Close): the classic highest/lowest close, or a slightly noisier High/Low variant.
- **Basis Type** (default Moving Average): compare with a moving average of itself, set by **MA Type** (default SMA) and its **Length** (default 28), or with a percentile via **Percentile Rank** (default 75) over **Lookback** (default 100).
- **Slope Lookback** (default 1): bars behind the rising/falling read.
- Style: **Color Mode** (default Regime (vs Basis)), plus **Show Basis Line**, **Gradient Fill** and **Regime Label** (all on).

## Frequently Asked Questions

### VHF or the Choppiness Index?

They attack the same question from opposite ends. The [Choppiness Index](https://www.luxalgo.com/library/indicator/choppiness-index/) sums true ranges into a bounded 0-100 scale where high readings mean congestion; the VHF is an unbounded progress ratio where high readings mean trend, read against its own history rather than fixed bands.

### Why is there no fixed trending threshold?

Because the ratio's typical level shifts with the market and timeframe. The basis is the answer: a reading is trending when high relative to its own recent readings, wherever that sits.

### Is a rising VHF bullish?

No. The numerator measures the size of net progress, not its sign, so a waterfall decline scores exactly as trending as a vertical rally. The VHF chooses the toolkit; direction is a separate question.

## Related indicators

- [Structure & Trend Dashboard](https://www.luxalgo.com/library/indicator/structure-trend-dashboard/) (Trend Regime Label): markdown at https://www.luxalgo.com/library/indicator/structure-trend-dashboard.md
- [Trending Market Toolkit](https://www.luxalgo.com/library/indicator/trending-market-toolkit/) (Trend Regime Label): markdown at https://www.luxalgo.com/library/indicator/trending-market-toolkit.md
- [Change-Point Detection (CUSUM)](https://www.luxalgo.com/library/indicator/change-point-detection-cusum/) (Trend Regime Label): markdown at https://www.luxalgo.com/library/indicator/change-point-detection-cusum.md
- [Correlation Trend Indicator](https://www.luxalgo.com/library/indicator/correlation-trend-indicator/) (Trend): markdown at https://www.luxalgo.com/library/indicator/correlation-trend-indicator.md
- [HyperTrend](https://www.luxalgo.com/library/indicator/hypertrend/) (Trend Regime Label): markdown at https://www.luxalgo.com/library/indicator/hypertrend.md
- [HTF Candle Consistency](https://www.luxalgo.com/library/indicator/htf-candle-consistency/) (Higher-timeframe Trend Filter): markdown at https://www.luxalgo.com/library/indicator/htf-candle-consistency.md
- [Average Directional Index](https://www.luxalgo.com/library/indicator/average-directional-index/) (ADX / DMI System): markdown at https://www.luxalgo.com/library/indicator/average-directional-index.md
- [Anchored Powered KAMA](https://www.luxalgo.com/library/indicator/anchored-powered-kama/) (Kaufman Efficiency Ratio): markdown at https://www.luxalgo.com/library/indicator/anchored-powered-kama.md

---

Source: https://www.luxalgo.com/library/indicator/vertical-horizontal-filter/ (LuxAlgo Library). Free to use with attribution: https://www.luxalgo.com/library/license/
