ATR indicator (Average True Range)

The ATR, short for Average True Range, is an indicator that measures a market's volatility: how far price moves on average from one candle to the next, opening gaps included. It says nothing about direction. J. Welles Wilder introduced it in 1978 in his book New Concepts in Technical Trading Systems. This lesson gives the exact calculation, worked by hand on seven candles, what the setting changes, its three uses and what it cannot tell you.

What the ATR measures, and what it does not

The ATR answers one question: how far does this market usually move, on the timeframe you are looking at? Its value is expressed in price units. An ATR of 2.50 on a stock quoted in dollars means its latest candles covered 2.50 dollars on average.

It does not say which way. TradingView's help page on the Average True Range puts it plainly: the ATR is not used to indicate the direction of price, it measures volatility and nothing else. A plunge and a surge of the same size produce the same ATR.

Why 'true'? According to StockCharts' ChartSchool, Wilder had commodities and daily prices in mind, markets that often open with a gap or a limit move. Measuring only the distance from the session's high to its low would leave that volatility out, so the true range brings the previous close into the calculation. Pages consulted in October 2026.

Forty candles and their 14-period ATR
Forty candles and their 14-period ATR Invented price series, real calculation. Top: forty candles, a quiet phase, eight wide candles that open with a gap (shaded area), then quiet again. Bottom: the 14-period ATR, Wilder's smoothing, on a scale that starts at zero. The line begins at the fourteenth candle (first dot), because it needs fourteen true ranges behind it. It climbs for as long as the wide candles last, peaks on the last of them (second dot), then drifts down slowly although the candles have already shrunk: that is the lag of an average.

The ATR calculation: true range, then its average

The calculation has two steps. First the true range of each candle. It is the greatest of three distances: the candle's high minus its low; the high minus the previous close, as an absolute value; the low minus the previous close, as an absolute value. TradingView, StockCharts and MetaTrader 5's help page on the ATR indicator give the same definition.

As long as the previous close sits inside the candle, the first distance wins. The other two only win when that close is above the high or below the low, in other words when price has jumped between two candles. The very first candle of a series has no previous close: its true range is simply its high minus its low.

Then the average. In Wilder's method as StockCharts lays it out, the first ATR is the simple average of the first 14 true ranges. Each value after that starts from the previous one: ATR = (previous ATR × 13 + current true range) ÷ 14.

Platforms do not all take that average the same way. TradingView applies by default an average it calls RMA, and lets you switch it to a simple, exponential or weighted one. MetaTrader 5's help only mentions a moving average of the true ranges, and the ATR indicator code published by MetaQuotes, its developer, takes the simple average of the last 14.

ATR worked by hand on seven candles

The prices are invented, and the ATR is set to 5 periods instead of 14 so that the calculation fits in seven candles. The method is unchanged: the 13 and 14 of the formula become 4 and 5.

Candle 1: high 101.00, low 99.00, close 100.50. No previous close, so the true range is 101.00 − 99.00 = 2.00. Candle 2: high 101.50, low 100.00, close 101.00. The three distances are 1.50, 1.00 and 0.50: true range 1.50.

Candle 3, which opens with a gap: high 104.00, low 102.50, close 103.50. The candle itself only spans 1.50, but its high is 3.00 away from the previous close, 101.00. True range 3.00: this is the case the true range exists for.

Candle 4: high 104.00, low 102.00, close 102.50, true range 2.00. Candle 5: high 103.00, low 101.50, close 102.00, true range 1.50. First ATR: (2.00 + 1.50 + 3.00 + 2.00 + 1.50) ÷ 5 = 2.00.

Candle 6, a wide bearish candle: high 102.50, low 98.00, close 98.50, true range 4.50. ATR = (2.00 × 4 + 4.50) ÷ 5 = 2.50. The candle is more than twice the ATR, and the ATR only rises by 0.50.

Candle 7, calm returns: high 99.50, low 98.50, close 99.00, true range 1.00. ATR = (2.50 × 4 + 1.00) ÷ 5 = 2.20. The candle is half the size of the starting ATR, and the ATR stays above 2.00: the wide candle still weighs on it.

With the simple average of the last five true ranges, the one the MetaTrader 5 indicator uses, candle 6 also gives 2.50, then candle 7 gives (3.00 + 2.00 + 1.50 + 4.50 + 1.00) ÷ 5 = 2.40. Same series, same setting, two values: 2.20 on one side, 2.40 on the other.

ATR settings: the 14-period default

TradingView, MetaTrader 5 and StockCharts all default to 14 periods. A period is one candle of the timeframe on screen: fourteen days on a daily chart, fourteen five-minute candles on a five-minute chart.

That number sets the weight of the latest candle. At 14 it counts for one fourteenth of the value. At 7, for one seventh: the ATR hugs the latest candles and jumps on every wide one. At 50, for one fiftieth: the line is smooth, and it takes a long time to register that a market has changed pace.

A short ATR tells you the volatility of the moment, a long ATR the market's usual level. If you move away from 14, write it into your rule: '2 ATR' is not the same distance at 7 periods and at 21.

What the ATR is used for: stops, position size, comparison

Setting a stop distance. The principle: keep the stop a multiple of the ATR away, so that the market's ordinary back-and-forth does not reach it. StockCharts' page on ATR trailing stops gives the calculation: for a long position, the highest price reached minus the ATR times a multiplier; for a short position, the lowest price reached plus that same product. The platform's default is a 21-day ATR multiplied by 3.

Those numbers are settings to test, not constants. To judge a multiple on your own trades, compare it with the MAE of your winners, the worst point they went through: if many of them moved further against you than your 2 ATR stop, that stop would have cut them. Tradoshi's reports show the average MAE and the worst MAE on a winner. The ATR does not choose where the stop goes: the article on where to place your stop loss covers that question.

Keeping risk constant. The stop distance sets the size: size = amount risked ÷ stop distance. On a 10,000 dollar account risking 1%, the loss allowed is 100 dollars. With an ATR of 2.50 dollars and a stop at 2 ATR, the distance is 5.00 dollars, so 20 shares. If the ATR doubles, the distance becomes 10.00 dollars and the size 10 shares, for the same 100 dollar loss. The position size calculator does that division for forex, gold and indices, and the risk management lesson walks through the calculation.

Comparing two volatilities. On the same instrument and the same timeframe, today's ATR can be compared with last month's. Between two instruments the raw value cannot, because it depends on price. It has to be set against the price, which is what the ATRP does: ATR ÷ close × 100, according to StockCharts' page on the Average True Range Percent. With invented numbers: an ATR of 12 on a 450 dollar stock is 2.7% of the price, an ATR of 0.90 on a 17 dollar stock is 5.3%. The second one moves twice as much, with an ATR thirteen times smaller.

The limits of the ATR

It gives no direction. A high ATR says neither that the market will rise nor that it will fall, only that its candles are wide. It is read next to a tool that deals with direction, never in its place.

It lags. It is an average. The example showed it: after a 4.50 candle the ATR was only at 2.50, and it was still at 2.20 one quiet candle later. It confirms that a market has heated up or calmed down, it does not announce it.

It depends on the timeframe. The ATR of a five-minute chart and the ATR of the daily chart of the same market do not measure the same thing. A stop worked out on one means nothing on the other.

It depends on price. Expressed in price units, it is higher on an expensive stock than on a cheap one without the first being more volatile. TradingView and StockCharts give the same warning.

It depends on the history loaded. With Wilder's smoothing, each value depends on all the previous ones. StockCharts warns that a calculation started on a small set of data will not exactly match the value on its charts, which is calculated over at least 250 periods.

Frequently asked questions

What does ATR mean in trading?

ATR stands for Average True Range. It is a volatility indicator created by J. Welles Wilder and published in 1978: it gives the average range of the latest candles, opening gaps included, in price units. It says nothing about direction.

How is the ATR calculated?

It is the average of the true ranges. A candle's true range is the greatest of three distances: high minus low, high minus previous close, low minus previous close, the last two as absolute values. In Wilder's method the first value is the simple average of the first 14 true ranges, then each one equals (previous ATR × 13 + current true range) ÷ 14.

What is the best ATR setting?

None is best in absolute terms. Fourteen periods is the default on TradingView, MetaTrader 5 and StockCharts. A shorter setting reacts faster and jumps more, a longer one is smoother and slower.

How do you use the ATR to place a stop loss?

By keeping the stop a multiple of the ATR away: a 2 ATR stop on a market whose ATR is 2.50 sits 5.00 from the entry. The multiple is a setting to test on your market and your timeframe, not an established rule.

Why is the ATR different on TradingView and MetaTrader?

Because the average is not the same. TradingView applies by default an average called RMA, which can be changed in the settings, while the ATR indicator published by MetaTrader 5's developer takes the simple average of the last 14 true ranges.

Key takeaways

  • The ATR measures the average range of recent candles, gaps included. It measures volatility, never direction.
  • True range: the greatest of three distances, two of which start from the previous close. The ATR is its average, over 14 periods by default.
  • In Wilder's method, ATR = (previous ATR × 13 + current true range) ÷ 14. TradingView and MetaTrader 5 do not use the same average by default.
  • It is used to set a stop distance and a position size. '2 ATR' is a setting to test, not a fact.
  • Its value depends on the timeframe and on the instrument's price: to compare two markets, set the ATR against the price.

Going further

These blog articles dig into this lesson's ideas, one subject per article.

Join the Oshi Academy

The lessons teach you the theory, the community makes you practise. We swap trades, screenshots and silly questions there, and nobody sells signals.

Join the Oshi Academy