ATR indicator: how to use Average True Range for stops and sizing
ATR measures how far a market typically moves per bar, gaps included. Traders use multiples of ATR to place stops and targets and to size positions so each trade risks a similar amount of money.
By Soren Huang · Published · updated · Editorial policy
Contents
- What is the ATR indicator and how is it calculated?
- Which ATR period setting should you use?
- How do ATR stops and targets compare with fixed-tick exits?
- How do you size futures positions with ATR?
- How do you test ATR multiples and check the settings are stable?
- What can ATR not tell you?
- Frequently asked questions
- References
The ATR indicator (Average True Range) measures how far a market typically moves per bar, gaps included. You compute the true range of each bar and average it over a period such as 14 bars. Then you set stops and targets as multiples of ATR and size positions so each trade risks a similar amount of money.
What is the ATR indicator and how is it calculated?
ATR is an average of each bar's true range, so it tells you in price units how much a market usually moves in one bar. J. Welles Wilder, who also created RSI, introduced it. The ATR indicator page covers the definition in full, so this article focuses on stops, sizing and testing.
True range is the largest of three distances for one bar:
- The bar's high minus its low.
- The distance from the previous close to this bar's high.
- The distance from the previous close to this bar's low.
The last two distances matter when the market gaps. A bar can have a small high-to-low range and still be a large move if it opened far from the previous close.
Hypothetical example
The previous bar closed at 100. The next bar opens higher and trades between 101 and 104. High minus low is 3. High minus previous close is 4. Low minus previous close is 1. The true range is 4, the largest of the three, so the gap from 100 to 101 is counted.
Average True Range (ATR) is the average of the true range over a chosen number of bars, called the period. Wilder used a smoothed average: each new ATR value keeps most of the old value and adds a small share of the newest true range. Some platforms offer a simple average instead. The two give slightly different numbers, so check which one your platform uses before you compare a backtest with live values.
Which ATR period setting should you use?
Start with Wilder's default of 14 bars and change it only when a test gives you a reason. The period trades reaction speed against noise.
| Period | Behaviour | Typical use |
|---|---|---|
| Short (about 5 to 10 bars) | Reacts fast, jumps after one large bar | Exits that should follow sudden changes in volatility |
| Default (14 bars) | Balanced, the most common reference | Initial stops and sizing |
| Long (about 20 to 50 bars) | Smooth, slow to change | Position sizing that should not change every day |
The period is counted in bars, not in time. A 14-period ATR on 5-minute bars covers 70 minutes. On daily bars it covers about three trading weeks. If you change the bar size, the same period describes a very different stretch of the market.
Two data choices change ATR more than most traders expect:
- Sessions. If your chart shows the day session only, the gap from yesterday's close to today's open becomes part of the first bar's true range. The same market on full-session bars spreads that move over the night bars. Decide on the session first, then measure ATR.
- Contract rolls. On an unadjusted continuous futures series, the price jump at a roll looks like a huge true range. That one bar can inflate ATR for weeks. Use a back-adjusted series, or make sure your data handles the roll.
How do ATR stops and targets compare with fixed-tick exits?
ATR exits adapt the distance to current volatility. Fixed-tick exits keep the same distance in every condition, so they are often too tight in fast markets and too loose in quiet ones.
An ATR multiple is the number you multiply ATR by to get an exit distance. With a multiple of 2 and an ATR of 15 points, a long position's stop sits 30 points below the entry price. A target might sit 3 ATR above it. A trailing version, often called a chandelier exit, keeps the stop a fixed number of ATR below the highest price since entry.
| Fixed-tick exit | ATR-based exit | |
|---|---|---|
| Stop distance | Same number of ticks every trade | Changes with recent volatility |
| Quiet market | Often wider than needed | Tightens with the market |
| Fast market | Normal swings can hit it | Widens to stay outside normal swings |
| Money at risk per contract | Constant | Varies, so sizing must adjust |
| Parameters to test | Tick distance | ATR period and multiple |
Three backtest details decide whether ATR exits are realistic:
- Use the ATR of the last completed bar. The current bar's ATR is not known until the bar closes. Using it for a stop on that same bar lets the test see the future.
- Decide whether the distance is frozen or updated. A stop fixed at entry and a stop recomputed every bar behave differently. Write down which one you test, and trade the same rule.
- Model gaps through the stop. When the market opens beyond your stop, you fill at the open, not at the stop price. A backtest that fills every stop at its exact level is too kind, and the error is largest for tight stops.
How do you size futures positions with ATR?
Volatility-scaled position sizing chooses the number of contracts so that a stop of a fixed number of ATR costs about the same share of the account on every trade. When volatility rises, you trade fewer contracts. When it falls, you trade more.
The calculation has one line:
Contracts = account risk ÷ (multiple × ATR × point value), rounded down.
- Account risk is the money you accept to lose on this trade, for example 1% of the account.
- Multiple is your ATR stop multiple, for example 2.
- ATR is the current ATR in price points.
- Point value is the money one full point of price movement is worth for one contract.
The position size calculator does this division for a given account risk and stop distance. The futures contract calculator shows tick size, tick value and point value. Exchanges set these values and can change them, so confirm them on the exchange's contract page.
Hypothetical example
An account of $100,000 risks 1% per trade, which is $1,000. ATR is 20 points and the stop is 2 ATR, so the stop is 40 points away. On a full-size contract worth $50 per point, the stop costs $2,000 per contract. That is more than $1,000, so the result is zero contracts. On a micro contract worth $5 per point, the stop costs $200 per contract, so the account trades 5 contracts.
Later, volatility doubles and ATR is 40 points. The stop is now 80 points, or $400 per micro contract. $1,000 ÷ $400 = 2.5, rounded down to 2 contracts. The actual risk is $800. The position shrank, and the money at risk stayed close to the target.
Practical points for futures:
- Always round down. Rounding up means every trade risks more than you planned.
- A result of zero is information. It means the stop is too wide for the account on that contract. Use a smaller contract, a smaller multiple, or skip the trade.
- Check margin after sizing. ATR sizing in a quiet market can suggest more contracts than your margin allows.
- Compare markets in money, not points. ATR times point value gives the money one ATR is worth per contract. That number lets you size an index future and a gold future to similar risk.
How do you test ATR multiples and check the settings are stable?
A good ATR setting sits on a broad plateau of similar results. A single sharp peak surrounded by weak results usually means the backtest fitted noise. Think of it like choosing a place to stand on a hill: a wide flat top is safe, a needle point is not.
- Fix the entry rule. Test exits on one entry rule at a time, so you know which change caused a result.
- Pick a coarse grid. For example, periods of 7, 14, 21 and 28 against stop multiples of 1.0, 1.5, 2.0, 2.5, 3.0 and 4.0.
- Include costs and next-bar execution in every run. Small multiples create many stop-outs, and each one pays commission and slippage.
- Look at the whole grid. Check whether neighbouring cells give similar net results and drawdowns.
- Choose from the middle of a plateau, not the single best cell.
- Confirm out of sample. Run a walk-forward analysis and check that each window picks a multiple from the same region.
Every extra setting you try raises the chance that the best one looks good by accident. With 4 periods, 6 stop multiples and 5 target multiples you have 120 variants. The best of 120 is inflated, because some variant will fit the past's noise well. Research on backtest overfitting shows that the more configurations you try, the more likely the top result fails on new data (Bailey, Borwein, López de Prado and Zhu, 2014). Keep the grid coarse, write down how many variants you tried, and read overfitting in strategy generation before you widen the search.
AlphaPrime (Valynox) handles this kind of search through strategy generation, where you set parameter ranges, entry and exit conditions and search constraints. AlphaPrime evaluates each candidate with the same fees, slippage and next-bar execution, so the grid compares like with like.
What can ATR not tell you?
ATR measures how much price moves, not which way it moves. Use it to place exits and size positions, not as an entry signal on its own.
- No direction. ATR rises in a sharp rally and in a sharp sell-off alike. A high ATR says the market is moving a lot, nothing more.
- No forecast. ATR describes the last N bars. Volatility can jump on the next bar after a news release, and ATR follows only afterwards.
- Lag after spikes. One very large bar can keep a long-period ATR elevated for many bars after the market calms down.
- Price units only. An ATR of 20 points means different things at a price of 500 and a price of 20,000. To compare markets or long periods, divide ATR by price to get ATR as a percentage.
- Data artefacts. Bad ticks, missing bars and roll gaps all enter the true range. Clean data comes first.
What this means if you use AlphaPrime: test ATR periods and multiples as parameter ranges with costs included, then keep only settings that hold up across a broad region and in walk-forward windows.
Frequently asked questions
What is a good ATR multiple for a stop loss?
Many traders start between 1.5 and 3 ATR, but no multiple is right for every market and bar size. Test a coarse range on your own strategy with costs included. Choose a value from a stable region where neighbouring multiples give similar results.
What is the best ATR period setting?
The common default is 14 bars, the setting Wilder used. Shorter periods react faster but jump after single large bars. Longer periods are smoother but slower. Remember that the period counts bars, so 14 on a 5-minute chart is a much shorter time span than 14 on a daily chart.
Does ATR show the trend direction?
No. ATR measures the size of price moves, not their direction. It rises in strong rallies and strong declines alike. Pair it with a separate entry or trend rule.
Why does my ATR value differ between platforms?
Platforms can use different averaging methods, such as Wilder's smoothing or a simple average. Session settings and how the data handles contract rolls also change the true range. Use the same method and the same data in the backtest and in live trading.
References
- Bailey, D. H., Borwein, J., López de Prado, M., & Zhu, Q. J. (2014). Pseudo-Mathematics and Financial Charlatanism: The Effects of Backtest Overfitting on Out-of-Sample Performance. Notices of the American Mathematical Society, 61(5), 458–471.
What AlphaPrime does here
AlphaPrime's strategy generation searches parameter ranges and entry and exit conditions. Its backtesting evaluates every candidate with fees, slippage, next-bar execution and your trading sessions.

