How Vortex Is Calculated: Formula, Inputs, and Verification

Vortex calculation formula inputs verification limitations.

What Vortex is and what “calculated” means

Vortex is a technical indicator designed to measure directional movement strength over a chosen lookback period. In practice, it is computed from the high and low of each price bar, producing two values that are often called VI+ and VI−.

“Calculated” here means: for each bar, the indicator computes directional movement components and then averages them over the lookback window, giving a pair of lines that can be compared to judge whether recent movement has leaned more upward or downward.

A key point is that the indicator’s numeric output is deterministic given the input price series (highs and lows) and the selected parameters (especially the lookback length). What changes across markets, providers, or datasets is not the formula, but the input data and bar construction.

The Vortex calculation (formula and parameters)

To describe the mechanics, assume you have a time-ordered series of bars. Let:

  • High[t] be the high of the current bar.
  • Low[t] be the low of the current bar.
  • High[t−1] and Low[t−1] be the prior bar’s high and low.

Choose a lookback length, usually written as N (for example, N = 14 in many educational contexts). For each bar t after enough history exists, Vortex forms two directional true-range-like movements:

  1. Compute the upward and downward movement components
  • VM+(t) = |High[t] − Low[t−1]| if High[t] − Low[t−1] > 0, otherwise 0
  • VM−(t) = |Low[t] − High[t−1]| if Low[t] − High[t−1] > 0, otherwise 0

(Several published descriptions express these using the idea of “if the relevant difference is positive, keep it, otherwise set it to 0.” The intent is to separate upward-leaning movement from downward-leaning movement using adjacent highs and lows.)

  1. Compute the combined range component
  • TR(t) = max(High[t], Low[t−1]) − min(Low[t], High[t−1])
  1. Average over the lookback period Compute sums across the last N bars (from t−N+1 through t), then divide:
  • VI+(t) = (sum of VM+(k) for k = t−N+1 to t) / (sum of TR(k) for k = t−N+1 to t)
  • VI−(t) = (sum of VM−(k) for k = t−N+1 to t) / (sum of TR(k) for k = t−N+1 to t)

This produces two values each between 0 and 1 in typical definitions, since each VM component is built from a nonnegative part of the same range logic used in TR. If TR sums to 0 (for instance, with pathological or constant inputs), the division is undefined; robust implementations handle this by returning missing values or skipping the calculation.

What data requirements matter

To compute Vortex yourself, you need:

  • A consistent sequence of bars in time order.
  • For each bar: high and low values.
  • A chosen lookback N.

You do not need close prices for the core Vortex computation as commonly described; the directional strength comes from the high/low relationships to the previous bar.

Evidence through a worked, checkable example

Because no specific live prices are assumed here, the example is symbolic but still checkable.

Pick N = 3 and consider bars t = 1, 2, 3, 4. Suppose you want VI+(4) and VI−(4). The calculation uses bars k = 2, 3, 4 as the last three bars.

Step A: for each k in {2, 3, 4}, compute:

  • VM+(k) using High[k] and Low[k−1]
  • VM−(k) using Low[k] and High[k−1]
  • TR(k) using High[k], Low[k], High[k−1], Low[k−1]

Step B: sum them over the window:

  • SumVM+(4) = VM+(2) + VM+(3) + VM+(4)
  • SumVM−(4) = VM−(2) + VM−(3) + VM−(4)
  • SumTR(4) = TR(2) + TR(3) + TR(4)

Step C: divide:

  • VI+(4) = SumVM+(4) / SumTR(4)
  • VI−(4) = SumVM−(4) / SumTR(4)

What you can verify independently:

  • If VM+(k) is set to 0 whenever the chosen “directional difference” is not positive, then VI+(t) can only increase when upward-leaning movement dominates the window.
  • If the high/low pattern is symmetric or alternates in a way that produces similar VM+ and VM− values, VI+ and VI− will tend to be close.

Even without interpreting the lines, you can confirm correctness by reproducing these intermediate components (VM+ or VM− and TR) for each bar and checking that the sums and divisions match your calculator or charting software.

Key limitations and failure modes to expect

  1. Sensitivity to the lookback length (N) A longer N smooths the directional strength over more bars, making VI+ and VI− less reactive. A shorter N makes them respond faster to recent changes. The failure mode is misinterpreting timing: the same market behavior can produce different readings solely due to parameter choice.

  2. Dependence on bar construction Vortex uses high and low from each bar. If the chart uses different timeframes, different trading sessions, or different data vendors with slightly different high/low values, your computed VI+ and VI− can differ. This is not a formula problem; it is an input-data alignment issue.

  3. Not a standalone signal The indicator outputs comparative directional strength measures, not a guarantee of direction or timing. Interpreting VI+ versus VI− without context can lead to overconfidence—especially in choppy conditions where both lines can fluctuate.

  4. Division by zero or near-zero range If TR sums to 0 over the window (for example, from constant or degenerate input series), the ratio is undefined. Even when not exactly zero, very small TR sums can make the ratio unstable, amplifying noise.

How to verify Vortex calculations without assuming outcomes

A practical verification approach is to treat the indicator as a pure computation:

  1. Pick N and a specific bar index t.
  2. Extract the exact high and low values used by your chart or data file.
  3. Recompute VM+(k), VM−(k), and TR(k) for each k in the lookback window.
  4. Sum and divide to obtain VI+(t) and VI−(t).
  5. Compare your computed values to the chart’s outputs for the same timeframe and bar alignment.

If your numbers don’t match, common causes are:

  • Different definitions of the directional components (minor variations exist in how the positive/zero logic is expressed). - Different parameter conventions (for example, an indicator labeled with N might use a different effective window length internally).
Trading foreign exchange and CFDs involves substantial risk. Information on FoxiForex is educational and is not personal financial advice. Sponsored placements are labelled clearly.