Skip to content

trend indicator

ADX backtesting — Average Directional Index

The Average Directional Index (ADX) measures how strong a trend is, regardless of its direction — it does not tell you whether price is going up or down, only how forcefully it is moving. Paired with a directional signal, it is a common way to filter out trades taken in dead, sideways conditions, and a backtest is how you find out if the filter earns its keep.

Try ADX on BTC/USDT ETH/USDT SOL/USDT

How ADX works

ADX is derived from the Directional Movement System: +DI measures upward directional movement and -DI measures downward directional movement, both smoothed over a lookback window. The DX line measures the normalized difference between +DI and -DI, and ADX is a further smoothed average of DX — which is why ADX itself is slow-moving and lags both price and the DI lines. A rising ADX means the trend, up or down, is strengthening; a falling or low ADX means the market is choppy or range-bound. CandleTest computes ADX and its DI lines with TradingView-parity math. Common testable rules: ADX above a threshold as a trend-strength filter, or +DI crossing -DI as a directional signal.

ADX settings

Lengthdefault 14

The smoothing window shared by +DI, -DI, and ADX. Shorter lengths make all three react faster to new price swings; longer lengths produce a slower, steadier trend-strength reading.

Example ADX strategies to backtest

Directional crossover

Enter long when +DI crosses above -DI. Exit when -DI crosses back above +DI.

Trend-strength filter

Enter long when +DI crosses above -DI and ADX is above 25 — only taking directional signals when the underlying trend has real strength behind it.

Every rule above is buildable in the no-code strategy builder — pick conditions, press run, and get win rate, drawdown and equity curve on real exchange data with fees and leverage modeled.

ADX FAQ

What does an ADX reading actually mean?

ADX says nothing about direction — a high reading just means the current trend, whichever way it points, is strong, and a low reading means the market is flat or choppy. It has to be paired with +DI/-DI or another directional signal to produce an actual entry rule.

What ADX level counts as a strong trend?

There are widely cited thresholds, but "strong" is relative to the market and timeframe — the only way to know if a given threshold improves your specific rule is to backtest it with and without the ADX filter and compare.

Does filtering trades by ADX improve results?

It often reduces the number of trades taken in choppy, low-quality conditions, but it also delays entries since ADX is a lagging, smoothed measure. Whether the trade-off nets out positive depends on the strategy and market — test both versions of the rule to see.

Is CandleTest’s ADX the same as TradingView’s?

Yes — the Directional Movement calculations for +DI, -DI, DX, and ADX follow TradingView conventions and are unit-tested for parity.

Related indicators