How is ADX Strategies calculated?

ADX calculation formula inputs data limitations.

Direct answer

ADX-based “trend strength” values are calculated from price changes by combining (1) directional movement in two directions, (2) a volatility measure called true range, and (3) smoothing over a lookback period. The result is a single line (often called ADX) that grows when directional movement is consistently strong and falls when it is weaker.

Mechanism or definition

What the calculation is trying to measure

An ADX-style indicator converts raw price movement into two intermediate ideas:

  1. Directional movement: how much of the recent high/low change goes “up” versus “down”.
  2. Volatility normalization: how large the movement is relative to overall trading range, using true range.

Then it combines these into directional indicators and finally into ADX, which is intended to represent trend strength rather than direction.

Required inputs (data requirements)

To compute it, you need a time-ordered series of at least:

  • High prices
  • Low prices
  • Close prices

At minimum, you must have enough bars to compute the lookback period and smoothing. If you do not have sufficient historical bars, the early values are undefined or are produced only after enough data accumulates.

Core intermediate steps (one common formulation)

Below is the common step-by-step structure. Different charting packages may use slightly different smoothing conventions, but the same components appear.

1) Compute directional movement components

For each bar t (starting after the first bar), compare the current bar’s high/low to the prior bar:

  • Up move compares current high to prior high.
  • Down move compares prior low to current low (often framed as a decrease).

Directional movement is then split so that only one direction contributes per bar:

  • +DM is the “up” component when it is stronger than the “down” component.
  • -DM is the “down” component when it is stronger than the “up” component.

All else becomes zero. This “choose the dominant direction” rule is important: it prevents both directions from being counted simultaneously from the same bar.

2) Compute true range (TR)

True range measures how far price has moved, accounting for gaps. A standard definition is based on three candidates:

  • Current high minus current low
  • Absolute value of current high minus prior close
  • Absolute value of current low minus prior close

TR is the maximum of these candidates for bar t.

3) Smooth +DM, -DM, and TR over a lookback period

Instead of using raw sums every time, ADX calculations typically apply smoothing over a period N (commonly called the lookback). A smoothing method (often Wilder-style) updates running totals rather than recalculating from scratch each bar.

You can think of this as:

  • Compute a smoothed +DM total
  • Compute a smoothed -DM total
  • Compute a smoothed TR total

The exact smoothing formula matters because it changes responsiveness.

4) Compute directional indicators (+DI and -DI)

Directional indicators convert directional movement into a percentage-like quantity by dividing by smoothed true range:

  • +DI = (smoothed +DM / smoothed TR) × 100
  • -DI = (smoothed -DM / smoothed TR) × 100

If smoothed TR is zero (rare but possible in degenerate data), the division is undefined; implementations should handle this.

5) Compute DX (directional index) and then ADX

A common intermediate is:

  • DX = (|+DI − -DI| / (+DI + -DI)) × 100

Then ADX is the smoothed average of DX over the lookback period:

  • ADX = smoothed average of DX

This produces a single line that increases when +DI and -DI are persistently separated (one direction dominating) and decreases when they converge.

Evidence or example

A minimal worked example setup (with assumptions)

To verify understanding, you can do a small “paper check” using a short window. Suppose you pick a lookback period N and then compute from bar 1 onward.

  1. Pick a fixed N (for example, 14) and ensure you have at least N + 1 bars.
  2. For each bar after the first:
    • Compute +DM and -DM using the up-move/down-move comparison rule.
    • Compute TR as the maximum of the three TR candidates.
  3. Apply the chosen smoothing method to +DM, -DM, and TR.
  4. Compute +DI and -DI from the smoothed values.
  5. Compute DX and then compute ADX as a smoothed average of DX.

Assumptions you must state for any example:

  • You are using a specific smoothing convention.
  • You are using the same indexing (bar t and bar t−1 definitions) as your data source.

Because different platforms can implement smoothing details differently, the numeric outputs can diverge even when the overall structure is the same.

Limitations and risks

1) Trend strength, not direction

ADX-style outputs are designed to express strength of directional movement, not automatically the direction of future price. A high value can occur in either an uptrend or a downtrend; direction is typically inferred from the relationship between +DI and -DI, not from ADX alone.

2) Parameter sensitivity

The lookback period and smoothing choice materially change behavior:

  • A shorter period typically reacts faster to recent movement.
  • A longer period typically smooths noise more but can lag.

This affects how often the indicator rises or falls and how quickly it responds to regime changes.

3) Data and implementation failure modes

Common practical problems include:

  • Insufficient history: early ADX values may be undefined or based on partial windows.
  • Different definitions: alternative formulations for DM assignment or TR can shift results.
  • Indexing errors: mixing up the order of bars (chronology) or using incorrect prior-close references breaks the computation.

4) Volatility and noise

Because the calculation normalizes directional movement by true range, it can be sensitive to volatility spikes. In choppy or highly volatile conditions, +DI and -DI can alternate frequently, which may reduce the usefulness of any single ADX reading for interpretation.

Verification or next question

To independently verify your understanding, do this checklist:

  1. Confirm your data source provides time-ordered High, Low, Close series without missing bars.
  2. Write down the exact formulas your target platform uses for:
    • +DM and -DM rules
    • TR definition
    • smoothing method
  3. Recalculate ADX on a small sample window and compare intermediate outputs (+DI, -DI, DX) rather than only the final line.

If you want to go one step further, a useful follow-up is how settings change the indicator’s responsiveness and scale (lookback and smoothing), or how ADX-style readings are interpreted together with +DI and -DI.

Trading foreign exchange and CFDs involves substantial risk. Information on FoxiForex is educational and is not personal financial advice. Sponsored placements are labelled clearly.