TL;DR
ATR (Average True Range) measures market volatility by calculating the average of true price ranges over a specified period, typically 14. Traders use it to set adaptive stop losses, size positions, and assess whether a market is worth trading.
The Average True Range (ATR) is a volatility indicator developed by J. Welles Wilder Jr. and introduced in his 1978 book 'New Concepts in Technical Trading Systems.' Unlike most indicators that measure price direction, ATR measures the degree of price movement regardless of direction. A high ATR value means the market is experiencing large price swings (high volatility), while a low ATR value indicates small price movements (low volatility). ATR does not indicate trend direction; it simply tells you how much an asset typically moves during a given period. This makes it an essential tool for setting stop losses, determining position sizes, and identifying when market conditions are favorable for trading. ATR is used across all markets including stocks, futures, forex, and cryptocurrencies, and is available on every major charting platform.
ATR is calculated in two steps. First, the True Range (TR) is determined for each period. The True Range is the greatest of three values: the current high minus the current low, the absolute value of the current high minus the previous close, or the absolute value of the current low minus the previous close. Including the previous close in the calculation is important because it captures gap moves that a simple high-minus-low range would miss. Second, the ATR is the moving average of the True Range values over a specified number of periods. Wilder originally used a 14-period smoothing, which remains the most common default setting. The first ATR value is calculated as a simple average of the first 14 True Range values. Subsequent values use Wilder's smoothing method, which is a form of exponential smoothing.
TR = max(High - Low, |High - Previous Close|, |Low - Previous Close|)TR — True Range for the current period
High — Current period high
Low — Current period low
Previous Close — Prior period closing price
Pro Tip
The default 14-period ATR works well for most applications. For day trading on intraday charts, some traders use a 10-period ATR for slightly faster response, or a 20-period ATR for smoother readings. Avoid going below 7 periods as the readings become too noisy.
One of the most practical applications of ATR is setting stop losses that adapt to current market volatility. Instead of using a fixed number of points or pips for every trade, an ATR-based stop loss adjusts automatically. The standard approach is to place your stop loss 1.5 to 3 ATR values away from your entry price. In a long trade, the stop loss would be set at Entry Price minus (ATR multiplier x ATR value). For a short trade, the stop is at Entry Price plus (ATR multiplier x ATR value). A 2x ATR stop is the most common choice, providing enough room for normal price fluctuations while still protecting against adverse moves. In highly volatile markets, the ATR will be larger, resulting in a wider stop that prevents premature stop-outs. In quiet markets, the ATR will be smaller, creating a tighter stop that protects more profit.
| ATR Multiplier | Stop Distance | Best For |
|---|---|---|
| 1.0x ATR | Tight stop | Scalping, high win-rate strategies |
| 1.5x ATR | Moderate stop | Day trading with moderate targets |
| 2.0x ATR | Standard stop | Most trading styles, good balance |
| 2.5x ATR | Wide stop | Swing trading, volatile markets |
| 3.0x ATR | Very wide stop | Position trading, trend following |
ATR plays a crucial role in volatility-adjusted position sizing, a technique used by professional traders and CTAs (commodity trading advisors). The concept is straightforward: risk a fixed dollar amount per ATR unit. This ensures that each trade contributes roughly the same amount of volatility to your portfolio, regardless of the instrument or current market conditions. For example, if you want to risk $500 per unit of ATR and the current ATR of the E-mini S&P 500 is 50 points (worth $2,500 per contract), you would trade $500 / $2,500 = 0.2 contracts, meaning you would need to round to the nearest whole contract. This approach automatically reduces your position size in volatile markets (when ATR is high) and increases it in calm markets (when ATR is low). This is the same concept used in the famous Turtle Trading system, where position size was calculated based on the ATR (called N in their system).
Position Size = Dollar Risk / (ATR x Point Value)Dollar Risk — Fixed dollar amount you are willing to risk
ATR — Current ATR value
Point Value — Dollar value per point of price movement
Understanding the True Range calculation with concrete numbers clarifies why ATR accounts for gaps. Consider three consecutive bars of ES futures data. Bar 1: High = 5,030, Low = 5,010, Close = 5,025. Bar 2: High = 5,045, Low = 5,020, Close = 5,040. Bar 3 (gap up open): High = 5,070, Low = 5,048, Close = 5,065. For Bar 2, the three True Range components are: (1) High - Low = 5,045 - 5,020 = 25 points, (2) |High - Previous Close| = |5,045 - 5,025| = 20 points, (3) |Low - Previous Close| = |5,020 - 5,025| = 5 points. The True Range is the maximum: 25 points. In this case, the simple range (High - Low) captured the full movement. For Bar 3, the components are: (1) High - Low = 5,070 - 5,048 = 22 points, (2) |High - Previous Close| = |5,070 - 5,040| = 30 points, (3) |Low - Previous Close| = |5,048 - 5,040| = 8 points. The True Range is 30 points. Notice that the simple High - Low range was only 22 points, but the True Range captured the 8-point gap between the previous close (5,040) and Bar 3's low (5,048). This gap represents real price movement that affected traders' positions, and ignoring it would understate volatility. After computing True Range for 14 consecutive bars, the initial ATR is simply the arithmetic average of those 14 values. Subsequent ATR values use Wilder's smoothing: ATR = [(Previous ATR x 13) + Current TR] / 14. This smoothing makes ATR more stable than recalculating a simple average each period.
ATR(n) = [(Previous ATR x (n-1)) + Current TR] / nn — ATR period (typically 14)
Previous ATR — ATR value from the prior period
Current TR — True Range of the current bar
The ATR period you choose significantly affects your stop loss width, position size, and trade frequency. A shorter period (7 or 10) makes ATR more responsive to recent volatility changes, which means your stops adapt faster but also fluctuate more. A longer period (20 or 28) produces a smoother ATR that changes slowly, providing more stable stop distances but slower adaptation. For day traders on 5-minute charts, a 10-period ATR captures approximately 50 minutes of volatility data, which is usually sufficient for intraday stop placement. For swing traders on daily charts, the standard 14-period ATR covers about three weeks of trading and balances responsiveness with stability. For position traders, a 20-period ATR on daily charts covers a full month of data and produces very stable readings. One practical consideration is the ATR's behavior around news events. A short-period ATR will spike immediately after a high-impact news release (such as Non-Farm Payrolls or FOMC decisions) and may give you an unrealistically wide stop for your next trade. A longer-period ATR smooths out this spike over more bars, giving a more representative volatility reading. Some professional traders use two ATR periods simultaneously: a 7-period ATR for intraday volatility assessment and a 14-period ATR for stop loss calculation, combining fast awareness with stable risk management.
| ATR Period | Responsiveness | Stability | Best Timeframe | Use Case |
|---|---|---|---|---|
| 7 | Very fast | Low | 1-5 minute charts | Scalping, quick adaptation |
| 10 | Fast | Moderate | 5-15 minute charts | Day trading, intraday stops |
| 14 (default) | Balanced | Good | Any timeframe | General purpose, most widely used |
| 20 | Slow | High | Daily charts | Swing trading, stable stops |
| 28 | Very slow | Very high | Daily/weekly charts | Position trading, trend following |
Beyond stop losses and position sizing, ATR serves as a powerful filter for identifying favorable trading conditions. When ATR is rising, the market is becoming more volatile, which generally means larger moves and more trading opportunities. When ATR is falling, volatility is contracting, which often precedes a breakout but can also mean less profitable conditions for trend-following strategies. Some traders only take signals when ATR is above a certain threshold, ensuring they trade only when the market is moving enough to cover their costs and generate meaningful profits. Comparing the current ATR to its own moving average helps contextualize volatility: if the 14-period ATR is above its 50-period moving average, volatility is expanding. If below, volatility is contracting. This filter alone can significantly improve strategy performance by keeping you out of choppy, low-volatility markets where false signals are more common.
NinjaTrader 8 includes ATR as a built-in indicator that you can add to any chart. To add it, right-click your chart, select Indicators, and search for ATR. The default period is 14, which works for most applications. NinjaTrader displays ATR as a line in a separate panel below your price chart. In NinjaScript, accessing ATR is straightforward: double currentATR = ATR(14)[0] gives you the current 14-period ATR value. For ATR-based stop losses, you can code adaptive stops directly: SetStopLoss(CalculationMode.Ticks, ATR(14)[0] * 2 / TickSize) sets a 2x ATR trailing stop. For position sizing, you can calculate the number of contracts based on ATR: int contracts = (int)(dollarRisk / (ATR(14)[0] * Instrument.MasterInstrument.PointValue)). This automatically reduces your position when volatility is high and increases it when volatility is low. A particularly useful NinjaTrader technique is creating an ATR-based market regime indicator. Plot the ratio of ATR(14) to ATR(50): when this ratio exceeds 1.0, volatility is expanding (favoring trend strategies); when below 1.0, volatility is contracting (favoring mean-reversion strategies or staying flat). You can color-code your chart background based on this ratio to visually identify the current regime at a glance, helping you select the right strategy for current conditions.
Pro Tip
Create a NinjaTrader workspace with ATR displayed on multiple timeframes simultaneously: 5-minute ATR for intraday stops, daily ATR for swing trade stops, and weekly ATR for overall market volatility context. This multi-timeframe ATR view prevents you from being surprised by volatility shifts across different horizons.
Mistake
Using ATR as a directional indicator
Correction
ATR measures the magnitude of price movement, not its direction. A rising ATR can occur in both uptrends and downtrends. Use ATR for volatility assessment and risk management, not for predicting price direction.
Mistake
Using the same fixed stop loss for all market conditions
Correction
Replace fixed stops with ATR-based stops that adapt to current volatility. A 20-point stop that works well in calm markets will be too tight in volatile markets and too wide in very quiet markets.