Most traders set their stop at a fixed number: "a 20-point stop." The problem? 20 points can be far too tight on a volatile day (and you get stopped out by noise) or too loose on a calm day (and you risk more than you need to). The ATR fixes this by making the stop breathe with volatility. It's the indicator that turns amateur risk management into professional risk management.
01What the ATR is
ATR stands for Average True Range, created by Wilder (the same man behind the RSI). It measures how much price typically moves over a period — that is, volatility. Important: the ATR has no direction. It doesn't tell you whether price will rise or fall, only the typical size of the move. An ATR of 12 points on the E-mini S&P 500 (ES) means that, on average, price moves ~12 points per candle over that period.
"True Range": the ATR doesn't just use the difference between a candle's high and low. It also accounts for gaps (jumps between the previous close and the open), taking the greatest of the three measures. That's why it's "true" — it captures real volatility, including gapped opens.
02The main use: a dynamic stop loss
The classic application is the ATR-multiple stop. Instead of "a 20-point stop," you use "a stop at 2× the ATR away." So:
- Volatile market → high ATR → wide stop → you don't get stopped out by normal noise.
- Calm market → low ATR → tight stop → you risk less when you don't need the extra room.
The common multiple is between 1.5× and 3× the ATR, depending on how much room the strategy needs. The larger the multiple, the more room the trade has to breathe (and the larger the potential loss per trade).
Example: an ATR stop on the E-mini S&P 500
03Position sizing by ATR
The ATR also solves "how many contracts to trade." By combining the ATR stop with your risk per trade, you size automatically:
How many contracts? (Micro E-mini, MES)
Notice the lesson built in: when volatility is high (large ATR), the stop is wide, and to respect your 2% risk you need to trade fewer contracts. The ATR forces you to cut exposure precisely when the market is dangerous. It's automatic risk management.
Want the spreadsheet that does this math?
Our free risk-management spreadsheet sizes the position based on your stop and account.
04Coding the ATR and the stop
//@version=5 strategy("ATR Stop", overlay=true) period = input.int(14, "ATR Period") mult = input.float(2.0, "ATR Multiple") atr = ta.atr(period) // example: enter on the MA and use ATR for the stop ma = ta.ema(close, 21) if ta.crossover(close, ma) stopLoss = close - mult * atr takeProfit = close + mult * atr * 2 // target 2x the risk strategy.entry("Buy", strategy.long) strategy.exit("Exit", "Buy", stop=stopLoss, limit=takeProfit) plot(atr, "ATR", color=color.purple, display=display.data_window)
import pandas as pd def compute_atr(df, period=14): high_low = df["high"] - df["low"] high_close = (df["high"] - df["close"].shift()).abs() low_close = (df["low"] - df["close"].shift()).abs() # True Range = greatest of the three tr = pd.concat([high_low, high_close, low_close], axis=1).max(axis=1) return tr.ewm(alpha=1/period, adjust=False).mean() df["atr"] = compute_atr(df) # dynamic stop and sizing entry = df["close"].iloc[-1] atr_now = df["atr"].iloc[-1] stop = entry - 2 * atr_now risk_usd = 100 # 2% of a $5,000 account point_value = 5.0 # MES (Micro E-mini) loss_per_contract = (entry - stop) * point_value contracts = int(risk_usd / loss_per_contract) print(f"Stop: {stop:.2f} | Contracts: {contracts}")
05Other uses of the ATR
- Trailing stop: move the stop as price advances, always keeping it 2× ATR away — it locks in profit without choking the trade.
- Volatility filter: only trade when the ATR is above a minimum (avoids a dead market) or below a maximum (avoids extreme volatility).
- Proportional target: set take-profit as a multiple of ATR, keeping a consistent risk/reward in any regime.
Always remember: the ATR is not an entry signal. It doesn't tell you where price is going — only the size of the move. Using ATR as a buy/sell trigger is a conceptual mistake. It belongs in the risk-management equation (stop, target, size), combined with direction indicators like moving averages, MACD or structure.
06Frequently asked questions
What is the ATR?
Average True Range — a volatility indicator that measures the average range of price movement over a period. It doesn't indicate direction, only the typical size of the move. Essential for sizing stops proportional to volatility.
How do you use the ATR for the stop?
Multiply the ATR by a factor (e.g. 2×) and place the stop that distance from the entry. The stop is wide when the market is volatile and tight when it's calm, avoiding being stopped out by normal noise.
Does the ATR indicate direction?
No. It only measures volatility (the size of moves), never the direction. That's why it's used for risk management alongside trend indicators, and never as a standalone entry signal.
Which ATR multiple should you use for the stop?
Commonly between 1.5× and 3×. A larger multiple gives the trade more room to breathe (fewer noise stop-outs) but increases the potential loss per trade. Calibrate via backtest for your strategy.
Which ATR period should you use?
The default is 14 (Wilder's). Shorter periods react faster to volatility changes; longer ones smooth it out. 14 works well in most cases.