Back to the blog

ATR: volatility, stop losses and testing trading rules

What Average True Range measures, how it is calculated and how to study volatility-based stops without treating ATR as a directional signal.

Updated 2 min read

What Average True Range measures

ATR describes the size of the movements observed in previous bars. It is a volatility indicator expressed in the instrument’s price units, rather than a percentage or a prediction of direction. It can rise during an uptrend, a downtrend or a period of wide swings.

From True Range to ATR

For each bar, True Range is the largest of three values: high minus low, the absolute value of high minus the previous close, and the absolute value of low minus the previous close. Comparing with the previous close also accounts for gaps.

In Wilder’s formulation, the first ATR is the average of the first n True Range values. Subsequent values are calculated as (previous ATR × (n − 1) + current True Range) ÷ n. Some platforms offer different averaging methods: the period, timeframe and smoothing must be consistent when comparing two readings.

An example in pips

Suppose EUR/USD has an ATR of 0.0012. Since one pip is 0.0001, that reading is equivalent to 12 pips. A hypothetical rule placing the stop 1.5 times ATR away gives a distance of 18 pips. This does not mean the price will stay within that range or that the multiplier suits your strategy; it is a rule to investigate.

A 14-period ATR on hourly bars uses a different context from a 14-period ATR on daily bars. The number of periods alone does not describe the calculation’s time window.

Avoiding future information in a backtest

Define when the rule reads the indicator. If an entry is decided at a bar’s open using the previous closed bar, the ATR must also be the value available at that moment. Using future high, low or close values from the bar still forming introduces information that was not yet known.

An intrabar rule needs a reconstruction consistent with the data resolution and available updates. Defining this step matters more than choosing a multiplier with a few extra decimal places.

A wider stop does not mean unchanged risk

With a fixed position size, widening the stop increases the expected loss. If your method keeps a constant monetary risk budget, the position size must adjust to the new distance. When comparing a fixed stop with an ATR-based stop, make clear which approach you use and apply the same costs.

Compare several periods, examine drawdown and trade count, then check the rule on data that was not used to choose its parameters. The best result on the optimisation sample may prove fragile outside that sample.