Vertical Horizontal Filter – Settings and Trading Rules

Vertical Horizontal Filter, usually shortened to VHF, is a trend-strength indicator built to separate directional movement from noisy back-and-forth movement. It does not try to predict the next bar. Instead, it asks a simpler question: over a chosen lookback period, did price travel efficiently in one direction, or did it spend most of its time moving sideways and canceling itself out.

That makes VHF a market regime tool more than a pure entry signal. When the indicator rises, price is moving with more directional efficiency and the market is often transitioning into a trend or already trending. When the indicator falls, price is spending more time oscillating, overlapping, and retracing, which is more typical of a range. Traders often use it to decide whether trend-following logic or mean-reversion logic is more appropriate.

VHF is useful because many indicators fail when used in the wrong environment. A breakout tool can struggle in a flat market, while an oscillator can stay pinned and unhelpful in a strong trend. VHF helps reduce that problem by classifying conditions first. In practical chart work, that makes it a good companion to tools like Choppiness Index, moving averages, and momentum studies.

How Vertical Horizontal Filter is calculated

The core idea behind VHF is straightforward. It compares the total net distance between the highest close and lowest close during the lookback period with the sum of all day-to-day close changes over the same period. If price moved mostly in one clean direction, the net distance will be large relative to the path traveled. If price moved up and down repeatedly, the path traveled will be large relative to the net distance.

\text{VHF}<i>n = \frac{\max(C</i>{t-n+1},\dots,C_t) - \min(C_{t-n+1},\dots,C_t)}{\sum_{i=t-n+2}^{t} \left| C_i - C_{i-1} \right|}

In this formula, n is the lookback period and C is the closing price. The numerator measures the vertical distance between the highest and lowest close in the window. The denominator measures the total horizontal path in the sense of cumulative bar-to-bar movement. Because the denominator uses absolute changes, it captures all the back-and-forth movement that trend traders usually want to avoid.

A higher VHF reading means price moved more directly from one area to another. A lower reading means price traveled a messy path with many reversals. The indicator itself does not tell you direction. A rising VHF can happen during either an uptrend or a downtrend. Direction still has to come from price structure, moving averages, trendlines, or a second indicator such as Know Sure Thing or SMI Ergodic Indicator.

Best VHF settings and lookback periods

The most common VHF settings are short to medium lookbacks such as 14, 18, 20, 28, and 30 periods. Traders who want faster regime shifts often choose 14 or 18 because the indicator reacts sooner when price starts to expand directionally. The tradeoff is more noise. A shorter setting will rise and fall faster, which can be helpful for active swing traders but can also create more false transitions.

Longer settings such as 28 or 30 are usually chosen by traders who care more about stability than speed. These settings smooth out brief bursts of directional movement and focus more on whether the market has become consistently efficient over a broader window. That can work well for position trading and higher timeframes, where missing the first small part of a move is less important than avoiding repeated false starts.

There is no single best period because the ideal setting depends on chart timeframe and trade horizon. On a daily chart, 28 is often a practical middle ground because it is long enough to filter random swings but still responsive enough to catch developing trends. On intraday charts, traders often shorten the period because market structure changes faster. A useful rule is to pick one setting, backtest it on your market, and avoid constant tweaking after every losing trade.

How VHF behaves on charts

On the chart, VHF usually appears as a single line that rises when price becomes more directional and falls when the market becomes more rotational. One of the most useful observations is slope rather than absolute value. A rising VHF often means the current move is becoming more organized. A falling VHF often means the move is losing efficiency and the market is returning to overlap and churn.

This makes VHF especially helpful as a filter. Suppose price breaks above resistance and a trend system wants to buy. If VHF is also rising, that breakout has better structural support because price is not just moving upward but doing so with less internal noise. If price breaks out but VHF is flat or falling, the breakout may still work, but the odds of immediate follow-through are usually lower because the market is not behaving efficiently.

Traders also watch for transitions. A low and flattening VHF often marks a range. The first turn upward after an extended low period can signal that a new directional phase is beginning. The opposite is also useful: after a long trending move, VHF may stop rising and begin rolling over before price fully breaks down into a range. In that sense, VHF is less a trigger and more a context line.

When Vertical Horizontal Filter works best

VHF tends to work best when the market is shifting between clean directional phases and obvious consolidation phases. In those conditions, price behavior is distinct enough for the ratio to capture. A breakout from a base, an orderly trend continuation, or a persistent downtrend often pushes the numerator and denominator into a relationship that produces higher readings. That is why the indicator is effective for separating trend days from chop.

It is particularly useful when paired with a directional filter. For example, price above a rising SMA can define long bias, while VHF rising can confirm that the market is trending efficiently enough to justify a continuation trade. ADX measures trend strength from a different angle using directional movement, and the two can complement each other well. In this role, VHF does not need to forecast anything. It only needs to confirm that the market structure suits the type of trade being considered.

The indicator can also help traders stay out of low-quality conditions. Many avoidable losses come from applying breakout logic inside compression that has not yet resolved. When VHF remains low, it is often a warning that the market is still oscillating and that aggressive trend entries may be premature. In that sense, VHF is often more valuable for preventing bad trades than for creating new ones.

When VHF fails

VHF tends to fail when traders expect too much precision from it. It does not identify exact entry points, and it does not tell you whether the trend direction is up or down. A rising reading only says price movement is becoming more efficient. Without a directional filter, traders can easily misread the setup and buy into a clean downtrend or short into a clean uptrend.

Another common problem appears during sharp volatility shocks. A sudden expansion can lift VHF quickly, but that does not always mean a durable trend has formed. News-driven spikes, gap moves, and short squeezes can produce temporary directional efficiency followed by immediate reversal. In those cases, VHF is describing what just happened accurately, but it is not confirming that the move will persist.

It can also underperform in markets that rotate in large wide ranges. Price may travel far from top to bottom, which looks important visually, but if the movement is still alternating and overlapping inside the window, VHF may not confirm a trend in the way some traders expect. This is a reminder that efficient movement and large movement are not the same thing.

VHF trading rules and regime filters

A practical way to use VHF is to start with a two-part framework. First, define direction with price structure or a baseline such as the 50-period SMA. Second, use VHF to decide whether the market is clean enough for a trend-following trade. That keeps the indicator in its strongest role. In an uptrend, a rising VHF supports breakout and pullback entries. Tools like Donchian Channels or Supertrend can provide the actual breakout trigger while VHF confirms the regime is trend-friendly. In a sideways market with low VHF, it may be better to reduce size, wait, or use range logic instead.

One workable rule set is simple. Only take long trades when price is above a rising baseline and VHF is rising from a relatively low area. Enter on a breakout above recent resistance or on a pullback that holds support and turns back up. For shorts, invert the logic. Exit part of the position into strength and trail the remainder under structure or a moving average. Stops should be placed from price, not from VHF, because the indicator measures regime rather than risk distance.

A second useful filter is volume or momentum confirmation. If VHF rises at the same time as momentum improves, the move has better evidence behind it. That is where combining it with something like Balance of Power can help. VHF tells you the market is becoming directional, while a momentum or pressure indicator helps confirm whether buyers or sellers are actually in control.

Common VHF mistakes

One common mistake is treating a rising VHF as a buy signal. VHF only measures trend efficiency, not direction. A rising reading during a clean downtrend is just as valid as one during an uptrend. Without a separate directional filter, traders can end up entering against the prevailing move simply because VHF looks strong.

Another mistake is reacting to every small uptick in VHF as if a new trend is confirmed. Short bursts of directional movement – especially around news events or earnings gaps – can spike VHF temporarily without producing a lasting trend. Waiting for VHF to sustain its rise over several bars gives a more reliable signal than acting on the first jump.

Traders also sometimes use VHF with too short a lookback on daily charts, which makes the indicator noisy and hard to interpret. If the reading flips between trending and ranging every few days, the setting is likely too fast for the timeframe. A slightly longer period usually produces cleaner regime classifications.

Vertical Horizontal Filter summary

Vertical Horizontal Filter is best understood as a trend-efficiency filter. It compares net movement inside a lookback window with the total path price traveled, which helps distinguish clean directional movement from noisy back-and-forth trading. A higher reading suggests a more trend-friendly environment. A lower reading suggests more overlap and less efficient movement.

Its main value is not in giving standalone buy and sell signals. Its value is in helping traders apply the right style to the right market. Use it with price structure, direction filters, and disciplined risk rules. When treated as a context tool rather than a prediction engine, VHF can improve trade selection and reduce exposure to avoidable whipsaws.