Back to library
Library term·Indicators

Average True Range (ATR)

A volatility indicator showing how much an asset moves, on average, during a given timeframe. Essential for algorithmic position sizing and dynamic stop-loss placement.

Authored by·Editorially reviewed
Onur Erkan Yıldız
Founder, Financial Engineer · CMB-licensed

What is the Average True Range (ATR)?

Developed by J. Welles Wilder, the Average True Range (ATR) is a technical analysis indicator that measures market volatility by decomposing the entire range of an asset price for that period. Unlike MACD or RSI, ATR does not provide an indication of price trend or momentum; it strictly measures the degree of price movement or volatility.

The Mechanics of ATR

The indicator is based on the "True Range," which is the greatest of the following three values: Current High minus the current Low. The absolute value of the current High minus the previous Close. * The absolute value of the current Low minus the previous Close.

The ATR is then calculated as a moving average (typically 14 periods) of these True Range values. A rising ATR indicates increasing volatility, while a falling ATR suggests consolidation.

ATR in Algorithmic Trading and Risk Management

In quantitative finance and algorithmic systems (like MQL5 Expert Advisors), ATR is the ultimate tool for risk management. It is rarely used to trigger entries but is heavily utilized for: 1. Dynamic Stop-Loss Placement: Instead of using fixed pip/point stops, quants use multiples of the ATR (e.g., 1.5x or 2x ATR) to place stops outside the market's normal "noise," preventing premature liquidations. 2. Trailing Stops (Chandelier Exit): Algorithms continuously adjust trailing stops based on real-time ATR, giving trades more room to breathe when volatility spikes. 3. Position Sizing: By calculating the dollar value of 1 ATR, traders can adjust their lot sizes. If ATR is high (high risk), the algorithm automatically reduces the lot size to maintain a constant risk percentage per trade.

Related entries

Educational content authored by our team — informational only, not investment advice.