ForexBestRobots.comCompare EAs →
EN

VHF · CLOSE RANGE / ABSOLUTE CHANGES · REAL FOREX CHARTS

Vertical Horizontal Filter in Forex: Close Range, Absolute Changes and Real Charts

Measure the spread of recorded closes against their accumulated changes, then separate the filter from price direction and endpoint efficiency.

Higher VHF · rising price · 2024-02-02 19:00 UTC · VHF28 0.607235. USD/JPY H1 · UTC interval ends · A = selected close; B = preceding anchor close; G = missing hour before the bar. JPY per USD. Real retained Forexite 2024 quotes; indicator observations only.
Higher VHF · rising price · 2024-02-02 19:00 UTC · VHF28 0.607235. USD/JPY H1 · UTC interval ends · A = selected close; B = preceding anchor close; G = missing hour before the bar. JPY per USD. Real retained Forexite 2024 quotes; indicator observations only.

The Vertical Horizontal Filter divides a rolling range of closing prices by a sum of absolute close-to-close changes. It describes how efficiently those recorded closes span a range. A high value can accompany a rise or a fall; it does not choose an order direction.

Count the closes and the changes separately. VHF uses the last n closes for its range, while the n changes reach one close further back. That distinction explains both startup and its difference from Efficiency Ratio.

1. Read a close-based ratio, not a direction

The numerator is the highest close minus the lowest close in the active window. The denominator adds the absolute size of each closing-price change, retaining reversals rather than letting positive and negative changes cancel. This is a path through recorded closes, not the full movement inside every candle or a tick-by-tick path.

For valid inputs and a positive denominator, this ratio lies between 0 and 1. A higher value usually describes more efficient range expansion; it is neither a signed trend line nor a win probability. The 0.5 line is a visual reference only. There is no universally profitable VHF threshold in this guide.

2. Count n closes and n changes correctly

ΔC[j] = C[j] − C[j−1]

D = Σ |ΔC[j]|, j = t−n+1 … t

R(C) = max(C[t−n+1 … t]) − min(C[t−n+1 … t])

VHF(n) = R(C) / D

ER(n) = |C[t] − C[t−n]| / D

For period n, use closes C[t−n+1] through C[t] in the numerator. The denominator contains n changes from C[t−n] through C[t]. The earlier close C[t−n] is an anchor for the first change, not another member of the n-close range. VHF28 therefore first needs 29 recorded closes, without an EMA seed or smoothing.

At the rising-price observation, the 28-close range is 2.350 JPY per USD and the absolute-change sum is 3.870. Their quotient is 0.607235. The window convention matters: with 28 equal nonzero steps in one direction, this formula gives 27/28 = 0.964286, while endpoint efficiency gives 1. That arithmetic illustration is not a market chart.

If every one of the n changes is zero, the ratio is 0/0 and is unavailable here; some platforms return 0. A zero numerator with a positive denominator is different and gives a valid VHF of 0. The last n closes can all be equal even when the preceding anchor differs. No clipping, display shift or additional smoothing is applied.

3. Compare rising, falling and retracing prices

The selected rising and falling episodes both have relatively high VHF28, with opposite net price changes. The low-reading episode has a smaller closing range relative to its accumulated changes. These observations explain the ratio; they are not independent trading trials and contain no executed positions. A high value can follow one large closing move and does not certify a smooth trend.

Read the price-change column from the anchor close to the selected close: it spans n changes. The shaded box covers only the n closing prices. Candle wicks are visible for market context but do not enter this VHF numerator or denominator. Changing high/low wicks while preserving every close cannot change the ratio.

ObservationH1 end · UTCVHF2828-change net price movement · JPY per USD
Higher VHF · rising price2024-02-02 19:00 UTC0.607235+1.930
Higher VHF · falling price2024-05-01 22:00 UTC0.665428-3.060
Lower VHF · compact close range2024-07-10 19:00 UTC0.245989+0.730
Lower VHF · compact close range · 2024-07-10 19:00 UTC · VHF28 0.245989. USD/JPY H1 · UTC interval ends · A = selected close; B = preceding anchor close; G = missing hour before the bar. JPY per USD. Real retained Forexite 2024 quotes; indicator observations only.
Lower VHF · compact close range · 2024-07-10 19:00 UTC · VHF28 0.245989. USD/JPY H1 · UTC interval ends · A = selected close; B = preceding anchor close; G = missing hour before the bar. JPY per USD. Real retained Forexite 2024 quotes; indicator observations only.
Higher VHF · falling price · 2024-05-01 22:00 UTC · VHF28 0.665428. USD/JPY H1 · UTC interval ends · A = selected close; B = preceding anchor close; G = missing hour before the bar. JPY per USD. Real retained Forexite 2024 quotes; indicator observations only.
Higher VHF · falling price · 2024-05-01 22:00 UTC · VHF28 0.665428. USD/JPY H1 · UTC interval ends · A = selected close; B = preceding anchor close; G = missing hour before the bar. JPY per USD. Real retained Forexite 2024 quotes; indicator observations only.

4. Change the period without changing the timeframe

Periods 14, 28 and 56 are three calculations on the same H1 series, not three chart timeframes. Each has its own closing range, path sum and required earlier close. A shorter window need not give a larger value or an earlier useful signal. The period-comparison case makes the differences visible at one fixed time.

The periods and case-selection rules were saved before calculation. The higher-reading cases use 0.60 and the lower-reading case uses 0.25 only to select clear illustrations. Those values are not tested entries. The 40/80 control crops the display without changing the calculation history or any selected observation.

PeriodVHF
140.509146
280.333988
560.212235
Compare periods · 2024-02-01 00:00 UTC · VHF28 0.333988. USD/JPY H1 · UTC interval ends · A = selected close; B = preceding anchor close; G = missing hour before the bar. JPY per USD. Real retained Forexite 2024 quotes; indicator observations only. The shaded closing-price range and anchor B belong to the 28-period calculation. The curves compare VHF14, VHF28 and VHF56.
Compare periods · 2024-02-01 00:00 UTC · VHF28 0.333988. USD/JPY H1 · UTC interval ends · A = selected close; B = preceding anchor close; G = missing hour before the bar. JPY per USD. Real retained Forexite 2024 quotes; indicator observations only. The shaded closing-price range and anchor B belong to the 28-period calculation. The curves compare VHF14, VHF28 and VHF56.

5. Separate VHF from endpoint efficiency

The endpoint Efficiency Ratio uses the absolute difference between the selected close and C[t−n], divided by the same n-change sum. VHF instead uses the extrema of the last n closes. Because their numerators use different endpoints, neither ratio must always exceed the other. The comparison is ER for the selected period, not an adaptive KAMA moving average.

At the endpoint-comparison observation, VHF28 is 0.322581 and ER28 is 0.427419. Their common denominator is 4.960 JPY per USD. A change beginning before the n-close box can affect ER differently. Conversely, a round trip back to the anchor may leave ER at zero while VHF stays positive. Neither result supplies a buy or sell instruction.

H1 end · UTCVHFEndpoint ER · same periodAbsolute-change sum · JPY per USD
2024-10-03 17:00 UTC0.3225810.4274194.960
Compare endpoint efficiency · 2024-10-03 17:00 UTC · VHF28 0.322581. USD/JPY H1 · UTC interval ends · A = selected close; B = preceding anchor close; G = missing hour before the bar. JPY per USD. Real retained Forexite 2024 quotes; indicator observations only.
Compare endpoint efficiency · 2024-10-03 17:00 UTC · VHF28 0.322581. USD/JPY H1 · UTC interval ends · A = selected close; B = preceding anchor close; G = missing hour before the bar. JPY per USD. Real retained Forexite 2024 quotes; indicator observations only.

6. Follow outgoing terms and incomplete hours

D[t] = D[t−1] + |C[t]−C[t−1]| − |C[t−n]−C[t−n−1]|

A rolling denominator adds the latest absolute change and removes the oldest one. Its closing-price maximum or minimum can also expire. In the fixed rolling-window case, the latest close is unchanged but VHF28 moves from 0.171582 to 0.168067. A flat latest candle does not freeze a rolling indicator.

Missing hours are not manufactured. All retained bars, including partial hours, advance the recorded window; the previous retained close supplies a change across a gap. The number remains a calculation of retained observations, not a reconstruction of missing prices. A clean n-period calculation here requires n + 1 complete adjacent source hours.

The gap example deliberately keeps a numeric ratio together with a quality warning. A reading change is classified only when both current and previous source windows are clean and numeric. The explorer ends at the selected closed bar, so later candles and later extrema never enter an earlier observation.

2024-10-04 00:00 UTC · C 146.850 · VHF28 0.171582 → 0.168067

An unchanged latest close

A recorded gap · 2024-02-04 23:00 UTC · VHF28 0.608000. USD/JPY H1 · UTC interval ends · A = selected close; B = preceding anchor close; G = missing hour before the bar. JPY per USD. Real retained Forexite 2024 quotes; indicator observations only.
A recorded gap · 2024-02-04 23:00 UTC · VHF28 0.608000. USD/JPY H1 · UTC interval ends · A = selected close; B = preceding anchor close; G = missing hour before the bar. JPY per USD. Real retained Forexite 2024 quotes; indicator observations only.

7. Give the filter a defined role

VHF measures closing-range efficiency; endpoint ER measures net displacement efficiency. CHOP uses True Ranges, a High–Low box and logarithms, so VHF is not simply 1 − CHOP/100. ATR measures price-range magnitude. These tools can share price information, and combining them does not automatically create independent confirmation.

Before testing a strategy, define the signal bar, period, eligibility checks, direction, prior price boundary, entry timing, exits and costs. High VHF by itself is not an executable setup. This guide does not test strategy returns; the later VHF strategy needs its own saved protocol before any replay.

ToolNumerator or measurementWhat it does not provide
VHFRange of n closes / sum of n absolute changesPrice direction or a complete entry
Endpoint ERAbsolute n-change displacement / the same path sumThe KAMA moving-average line
CHOPTrue Range sum / High–Low range, logarithmically scaledAn algebraic inverse of VHF
ATRPrice-range magnitude in price unitsA trend direction
  1. Check the exact close window and the earlier anchor.
  2. Keep price direction separate from VHF level or slope.
  3. Distinguish a valid zero numerator from an undefined zero denominator.
  4. Inspect complete hours and missing observations before classifying a change.
  5. Freeze a full trading rule and costs before testing performance.

8. Inspect each recorded closing-price change

Choose a fixed case and period. Show the selected VHF alone, all three periods, or VHF beside the same-period endpoint ER. Open the components to inspect each signed change and absolute contribution. A marks the selected observation; B marks its earlier anchor when visible. History outside the crop still contributes.

Loading retained historical readings…

A is the selected close; B is its earlier anchor when visible. Earlier history still contributes.

H1 end · UTC
—
Close · JPY per USD
—
VHF
—
Endpoint ER · same period
—
Absolute-change sum · JPY per USD
—
Closing-price range · JPY per USD
—
VHF minus ER
—
Net price movement · JPY per USD
—
Source-window quality
—
VHF reading change
—
Inspect closing-price components
Previous close
—
Incoming absolute change
—
Highest close
—
Lowest close
—
Earlier anchor close
—
Outgoing absolute change
—
Anchor time · UTC
—
First close in range · UTC
—
Previous absolute-change sum
—
Time · UTCPrevious closeCurrent closeSigned changeAbsolute changeSource-window quality

Frequently asked questions

Does a high VHF mean buy?

No. The rising and falling real-price cases both have relatively high VHF28. Direction comes from a separate price rule. The filter is nonnegative and does not label a long or short position.

Why does VHF28 need 29 closes?

Its numerator spans the last 28 closes, while its denominator adds 28 consecutive close-to-close changes. The first change needs the preceding 29th close, which is outside the numerator window.

Is VHF the same as Efficiency Ratio?

No. They share the absolute-change denominator here, but VHF uses a range of closing prices while ER uses absolute displacement from the earlier anchor. Either can exceed the other. This ER comparison is not the KAMA moving-average output.

Can VHF change when the latest close is unchanged?

Yes. The oldest absolute-change term leaves the sum, and a previous closing extreme may leave the range. The rolling-window case shows an unchanged latest close with a changed VHF28.

What happens with flat or missing data?

A zero absolute-change sum is unavailable here. A zero closing range with a positive sum is a valid zero. Missing hours are not invented; retained observations still have numeric readings where possible, with explicit quality warnings.

Are 0.60, 0.25 or 0.5 tested trading thresholds?

No. The first two select contrasting examples, and 0.5 is a visual reference. The guide compares fixed indicator calculations on reused real history. It contains no strategy backtest, executed trades or return claim.

Data and calculation scope

We reuse the 375,702 retained USD/JPY M1 records from Forexite’s 2024 Trade/MetaStock archives already used in CHOP research. The fixed GMT+1 timestamps were previously shifted back one hour to UTC. Minute labels are interval ends; H1 groups are (start,end]. Original daily ZIPs were not downloaded again.

The reconstruction contains 6,265 recorded H1 bars: 6,178 complete, 87 partial and 52 gaps before recorded hours. The rising, falling and low-reading cases are the first eligible observations after the declared February, April and July starting dates. Period comparison starts in February; endpoint and rolling cases start in October; the gap case starts in February. Their 80-bar display windows can overlap.

The saved specification fixes formulas, periods, zero-denominator policy, quality checks and selection before calculation. One program uses monotonic extrema queues, rolling integer sums and 60-digit decimal division. A separate program rebuilds hours, takes direct closing slices and checks 80-digit decimal ratios with exact fractions. Both were authored by the same assistant; no external or trading-terminal certification is claimed.

The downloads preserve all hourly readings, original minute inputs and archive checksums, both programs, the specification and boundary checks. Synthetic fixtures test arithmetic only and are never market-chart candles. Reproduction instructions remain in the ZIP. Reused observations are not a new holdout or a forecast of profit.

Primary references