About the ATR Calculator (Average True Range)
Calculate the Average True Range (ATR), a measure of how much a market moves in a typical bar. Paste or load bars with high, low and close prices, choose the period, and see the ATR for every bar, as a price and as a percentage of the close.
A table turns the latest ATR into stop-loss distances of 1, 1.5, 2 and 3 times ATR from the last close, a common way to place stops outside normal day-to-day movement.
How it works
The true range of a bar is the largest of three distances: high minus low, the high minus the previous close, and the previous close minus the low. The last two count overnight gaps, which a simple high-minus-low range would miss. A gap up from a close of 10 to a bar trading between 14 and 15 has a true range of 5, not 1.
The first ATR is the simple average of the first 14 true ranges. After that each new value is smoothed the way J. Welles Wilder defined it: the previous ATR times 13, plus the new true range, divided by 14. TradingView uses this formula by default; MetaTrader's built-in ATR uses a plain average of the last 14 true ranges instead, so its values can differ slightly.
ATR is in price units: an ATR of 0.0065 on EUR/USD means a typical bar covers about 65 pips. The percentage of the close makes markets with different prices comparable.
Assumptions and limits
- Each bar needs a high, a low and a close: paste a CSV with those columns, or three numbers per line in that order.
- The first ATR appears on the 14th bar; values settle after a few dozen bars because of the smoothing.
- ATR measures how much the price moves, not which way.
Worked examples
Counting a gap
After a close of 10, a bar with a high of 15 and a low of 14 has a true range of 5 (15 − 10), not 1.
A 3-bar ATR
True ranges of 2, 2 and 3 give a first ATR(3) of 2.33; a next true range of 2 makes it (2.33 × 2 + 2) ÷ 3 = 2.22.
A volatility stop
With an ATR of 0.0060 and a close of 1.0850, a stop 2 × ATR away for a buy is at 1.0730.
How to use the ATR Calculator (Average True Range)
- Add your bars. High, low and close for each bar.
- Set the period. 14 is the standard.
- Read the ATR. With stop distances in multiples of ATR.
Frequently asked questions
How is ATR calculated?
For each bar find the true range: the largest of high minus low, high minus the previous close, and the previous close minus the low. The first ATR is the average of 14 true ranges; each later one is the previous ATR times 13 plus the new true range, divided by 14.
How do I use ATR for a stop loss?
Place the stop a multiple of ATR away from the entry, often 1.5 to 3 times, so ordinary movement doesn't trigger it. A larger ATR means a wider stop, which usually calls for a smaller position to keep the same risk.
What is a high ATR?
There is no fixed level, because ATR is in price units. Compare it with the same market's recent ATR, or look at ATR as a percentage of the price: a rising value means bars are getting larger and the market more volatile.
Why does ATR need the high and low?
ATR measures the full range each bar covers, including gaps from the previous close. A list of closing prices alone can't show how far the price travelled within each bar, so the high and low are needed.
Is ATR the same on MetaTrader and TradingView?
Not exactly. TradingView's ATR uses Wilder's smoothing (RMA) by default, as this page does, so the values agree. MetaTrader's built-in ATR takes a plain average of the last 14 true ranges, which gives slightly different numbers from bar to bar.
This tool runs entirely in your browser. What you enter or upload stays on your device and is never sent to our servers.