Average True Range (ATR): Formula, Wilder Smoothing, and Data Controls
Learn the exact ATR formula, Wilder RMA smoothing recurrence, step-by-step Excel formulas, ATR Percentage normalization, and historical chart replay controls.
The Average True Range (ATR) formula calculates volatility in two steps: first, find each bar's True Range as TR = max(High - Low, |High - Previous Close|, |Low - Previous Close|); second, smooth those values over n periods (typically 14) using J. Welles Wilder's recursive average ATR_t = ((n - 1) × ATR_(t-1) + TR_t) / n.
Because Wilder smoothing is recursive, getting reproducible ATR readings across TradingView, Excel, and your broker requires controlling the initial seed, warm-up bar count, session hours, and corporate-action adjustments. To practice measuring bar-by-bar range expansion on historical charts without future candles visible, open ChartMini Market Replay or our 5-minute Day Trading Simulator, or explore zero-registration practice tools in our paper trading simulator without login guide.
This reference owns the ATR formula, Wilder RMA math, Excel calculation, and data-control layer. For stop-loss multipliers, position-sizing workflows, and chandelier trailing exits, use our companion ATR Indicator Guide.
Educational note: ATR measures historical range magnitude in raw price units. It does not predict trend direction or guarantee future stop survival.
Key takeaways
- True Range captures both intrabar movement (
High - Low) and overnight or inter-bar gaps against the prior close. - Wilder's ATR uses a recursive smoothing weight of
1 / non the newest True Range and(n - 1) / non the prior ATR value (labeled RMA or SMMA on TradingView). - Early ATR bars depend on the initial seed and preloaded chart history; always allow a shared warm-up window when reconciling two platforms.
- Raw ATR carries the asset's quote unit (dollars, pips, or points) and cannot compare differently priced tickers without normalization.
- ATR Percentage (
ATRP = (ATR / Close) × 100) normalizes volatility relative to price. - An
ATR(14)on a 5-minute chart measures fourteen 5-minute bars (70 minutes), not 14 trading days. - Regular-hours vs. extended-hours data, timezone cutoffs, stock splits, and futures roll gaps directly alter the previous-close term in True Range.
Which ATR guide owns which question?
| Question | Canonical Owner |
|---|---|
| What is the exact True Range and Wilder ATR formula? | This formula and data-control guide |
| How do you calculate Wilder ATR step by step in Excel? | This formula and data-control guide |
| Why do two charting platforms display different ATR numbers? | This formula and data-control guide |
| How do you normalize ATR across differently priced stocks or pairs? | This formula and data-control guide |
| How do you test 1.5x, 2.0x, or 3.0x ATR stop-loss placement? | ATR Indicator Guide |
| How do you size positions from an ATR stop distance? | ATR Indicator Guide and Risk Management & Position Sizing Guide |
1. The True Range (TR) formula
For bar t, define three price inputs from the same historical series:
H_t= current bar highL_t= current bar lowC_(t-1)= previous completed bar close
True Range is the greatest of three nonnegative distances:
TR_t = max(
H_t - L_t,
abs(H_t - C_(t-1)),
abs(L_t - C_(t-1))
)
Taking absolute values ensures that a gap down below the prior close increases True Range just like a gap up above the prior close.
Worked True Range numerical examples
| Scenario | Previous Close (C_(t-1)) | Current High (H_t) | Current Low (L_t) | Intrabar (H_t - L_t) | Upper Gap (|H_t - C_(t-1)|) | Lower Gap (|L_t - C_(t-1)|) | Resulting True Range (TR_t) |
|---|---:|---:|---:|---:|---:|---:|---:|
| Normal inside/trending bar | 100.00 | 104.00 | 98.00 | 6.00 | 4.00 | 2.00 | 6.00 |
| Bullish overnight gap up | 100.00 | 108.00 | 105.00 | 3.00 | 8.00 | 5.00 | 8.00 |
| Bearish overnight gap down | 100.00 | 95.00 | 92.00 | 3.00 | 5.00 | 8.00 | 8.00 |
Look at rows 2 and 3: if you measured volatility using only High - Low (3.00 points), you would miss more than half of the true 8.00-point price displacement caused by the overnight gap.
Why the previous close is a critical data control
Even when two charts show the exact same current high and low, True Range will diverge if their previous-close source differs:
- Regular trading hours (16:00 ET close) versus extended after-hours close (20:00 ET).
- Official exchange settlement price versus last traded tick on futures contracts.
- Split-adjusted and dividend-adjusted equity history versus unadjusted trade prices.
- Dated individual futures contract versus a back-adjusted continuous symbol.
- UTC daily candle cutoff versus New York 17:00 FX daily cutoff.
2. J. Welles Wilder's ATR formula (recursive RMA smoothing)
In his 1978 book New Concepts in Technical Trading Systems, J. Welles Wilder defined Average True Range using a 14-period lookback (n = 14), though traders use shorter or longer windows depending on their holding horizon.
Step A: Initial seed value (Bar n)
Wilder's standard implementation seeds the first ATR reading on bar n using the simple arithmetic mean of the first n True Range values:
Initial ATR_n = (TR_1 + TR_2 + ... + TR_n) / n
Step B: Recursive Wilder update (Bar n + 1 onward)
Every subsequent bar updates the prior ATR using a recursive weighted average:
ATR_t = ((n - 1) × ATR_(t-1) + TR_t) / n
For the standard 14-period setting (n = 14), this simplifies to:
ATR_t = (13 × ATR_(t-1) + TR_t) / 14
Or equivalently in alpha-weight form (α = 1 / n):
ATR_t = ATR_(t-1) + (TR_t - ATR_(t-1)) / n
Worked 5-period Wilder ATR vs. SMA calculation table
To see why Wilder's recursive ATR (RMA) does not equal a simple moving average (SMA) of True Range, trace this 5-period example (n = 5, where α = 1/5 = 0.20 and (n - 1)/n = 4/5 = 0.80):
Bar t | True Range TR_t | Wilder ATR n = 5 Formula Step | Wilder ATR Value | 5-Bar Rolling SMA of TR | Difference: Wilder vs. SMA |
|---|---|---|---|---|---|
| Bar 1 | 2.00 | Warm-up accumulation 1 of 5 | — | — | — |
| Bar 2 | 3.00 | Warm-up accumulation 2 of 5 | — | — | — |
| Bar 3 | 2.50 | Warm-up accumulation 3 of 5 | — | — | — |
| Bar 4 | 4.50 | Warm-up accumulation 4 of 5 | — | — | — |
| Bar 5 | 3.00 | Seed = (2.00 + 3.00 + 2.50 + 4.50 + 3.00) / 5 | 3.00 | 3.00 | 0.00, identical at seed |
| Bar 6 | 5.50 | ((4 × 3.00) + 5.50) / 5 = 17.50 / 5 | 3.50 | 3.70 | -0.20 |
| Bar 7 | 2.00 | ((4 × 3.50) + 2.00) / 5 = 16.00 / 5 | 3.20 | 3.50 | -0.30 |
| Bar 8 | 2.50 | ((4 × 3.20) + 2.50) / 5 = 15.30 / 5 | 3.06 | 3.50 | -0.44 |
Notice that on Bar 8, the 5-bar SMA stays high at 3.50 until the old 4.50 spike drops out of the 5-bar window, whereas Wilder's recursive formula smoothly decays prior bars every step to 3.06. Note also that Wilder's smoothing with α = 1 / n reacts more gradually than a standard EMA of the same length where α = 2 / (n + 1): a 14-period Wilder RMA carries the same latest-bar weight of 1/14 ≈ 7.14% as a 27-period standard EMA where 2 / (27 + 1) = 7.14%.
3. How to calculate Average True Range (ATR) in Excel or Google Sheets
If you are building a spreadsheet backtest or verifying a chart indicator, place your OHLC data in columns A through E starting at Row 4 with Row 3 for headers and use these exact formulas for a 14-period Wilder ATR:
| Spreadsheet Row | Column A–E OHLC Inputs | Column F: True Range TR Formula | Column G: 14-Period Wilder ATR(14) Formula | Column H: ATR% Formula |
|---|---|---|---|---|
| Row 4, Bar 1 | A4: Date, B4: Open, C4: High, D4: Low, E4: Close | =C4-D4, first bar has no prior close | Leave blank, warm-up bar 1 of 14 | Leave blank |
| Row 5, Bar 2 | A5:E5 OHLC values | =MAX(C5-D5, ABS(C5-E4), ABS(D5-E4)) | Leave blank, warm-up bar 2 of 14 | Leave blank |
| Rows 6–16, Bars 3–13 | A6:E16 OHLC values | Drag F5 formula down through F16 | Leave blank, warm-up bars 3 to 13 | Leave blank |
| Row 17, Bar 14 Seed | A17:E17 OHLC values | =MAX(C17-D17, ABS(C17-E16), ABS(D17-E16)) | =AVERAGE(F4:F17), initial 14-bar arithmetic seed | =(G17/E17)*100 |
| Row 18+, Bar 15+ Wilder | A18:E18 OHLC values | =MAX(C18-D18, ABS(C18-E17), ABS(D18-E17)) | =((G17*13)+F18)/14, drag down for all later rows | =(G18/E18)*100 |
Warm-up history tip for Excel vs. TradingView reconciliation
Because Wilder's formula in cell G18 feeds into G19, G20, and every cell below it, any difference in the initial seed G17 decays by 13/14 or 92.86% per bar. After 100 bars of warm-up history, the weight remaining on the initial seed is (13/14)^100 ≈ 0.06%, meaning your Excel sheet and TradingView will converge to identical numbers once both load at least 100 to 150 prior bars from the same OHLC feed.
4. Raw ATR price units vs. ATR Percentage (ATRP)
Raw ATR inherits the exact unit of the chart's vertical price axis:
- U.S. equities: dollars per share, such as
$3.40per share. - Spot forex pairs: quote-currency units convert into pips, such as
0.0068on EUR/USD for68 pips, or1.15on USD/JPY for115 pips. - Index futures: index points, such as
45.00points on ES for$2,250per contract at$50/point.
Because raw units scale with nominal price, a $20 stock moving $1.00 per day with Raw ATR = 1.00 is actually more volatile in percentage terms than a $200 stock moving $4.00 per day with Raw ATR = 4.00.
To compare volatility across different stocks or across multi-year price growth on the same ticker, normalize with ATR Percentage:
ATRP_t = (ATR_t / Close_t) × 100
| Instrument | Closing Price Close_t | Raw 14-Day ATR ATR_t | Normalized ATRP | Volatility Interpretation |
|---|---|---|---|---|
| Stock A | $20.00 | $1.00 | 5.00% | Higher relative daily range at 5% of share price |
| Stock B | $200.00 | $4.00 | 2.00% | Larger dollar move, but 60% lower relative volatility |
Always specify which price denominator you used, such as Close_t, prior close, or a moving average, and remember that ATRP still does not measure futures contract multipliers, option gamma, or order-book liquidity.
5. Timeframe and chart interval scaling
An ATR(14) averages 14 bars of your active chart timeframe, not 14 calendar days:
| Active Chart Interval | What ATR(14) Actually Measures | Total Lookback Span |
|---|---|---|
| 5-minute chart, M5 | Average True Range of the last fourteen 5-minute bars | 70 minutes of trading |
| 1-hour chart, H1 | Average True Range of the last fourteen 1-hour bars | 14 trading hours |
| Daily chart, D1 | Average True Range of the last fourteen daily bars | ~3 calendar weeks or 14 trading days |
| Weekly chart, W1 | Average True Range of the last fourteen weekly bars | ~14 calendar weeks |
You cannot convert a Daily ATR(14) into an Hourly ATR(14) simply by dividing by the number of hours in a session, because intrabar overlaps and directional trends make multi-hour ranges scale sub-linearly. Furthermore, always read ATR on completed bars: an unclosed daily candle at 10:15 ET reflects only 45 minutes of high-low movement and will pull the live ATR reading artificially low until the session closes. For multi-interval rules, see our multiple timeframe analysis guide.
6. Why charting ATR readings differ: 10-point diagnostic checklist
When two charting programs display different ATR numbers on the same symbol, audit these 10 data controls before assuming a calculation bug:
| Control Layer | Common Setting A | Common Setting B | Effect on Calculated ATR |
|---|---|---|---|
| 1. Smoothing method | Wilder RMA with α = 1/n | Simple SMA or Exponential EMA | Changes responsiveness to recent volatility spikes |
| 2. Warm-up bar count | 5,000+ preloaded historical bars | Only 100 visible chart bars loaded | Alters recursive decay of the initial seed |
| 3. Session template | Regular Trading Hours, 09:30–16:00 ET | Extended Trading Hours, 04:00–20:00 ET | Changes high, low, previous close, and overnight gap handling |
| 4. Daily cutoff timezone | Exchange local time, America/New_York | UTC 00:00 daily boundary | Splits 24-hour forex and crypto trades into different daily bars |
| 5. Equity corporate actions | Split- and dividend-adjusted OHLC | Unadjusted historical trade prices | Unadjusted splits create artificial multi-dollar gap spikes |
| 6. Futures roll method | Additive back-adjusted continuous series 1! | Unadjusted continuous or single dated contract | Contract switch gaps inflate True Range if not back-adjusted |
| 7. Futures daily close | Official exchange settlement price | Last traded price at session close | Shifts C_(t-1) gap calculation on the next session's open |
| 8. Quote price source | Last trade price | Bid, Ask, or Midpoint price in OTC FX | Bid vs. midpoint changes high/low wicks during wide-spread news |
| 9. Sunday FX bar policy | Merged into Monday daily candle | Plotted as a separate short Sunday daily bar | A 2-hour Sunday bar depresses 14-day average range |
| 10. Current bar inclusion | Closed bars only | Includes live, incomplete current bar | Incomplete bar depresses intraday or daily ATR early in the period |
7. How ATR differs from ADR, Bollinger Bands, ADX, and Implied Volatility
Traders frequently confuse ATR with four other range or dispersion metrics. Each answers a distinct mathematical question:
| Indicator | Core Formula Input | Captures Overnight Gaps? | Directional or Unsigned? | Primary Analytical Job |
|---|---|---|---|---|
| ATR, Average True Range | `max(H-L, | H-C_prev | , | L-C_prev |
| ADR, Average Daily Range | Simple average of Daily High - Daily Low over n days | No, ignores prior day close | Unsigned, directionless | Estimating how far an intraday session has traveled vs. daily norm |
| Bollinger Band Width | ±k standard deviations of closing prices around an SMA | Indirectly via close dispersion | Overlay envelope around price | Visualizing price dispersion and mean-reversion extremes |
| ADX, Average Directional Index | Smoothed +DM and -DM normalized by True Range | Yes, in denominator | Unsigned trend-strength score from 0 to 100 | Measuring whether price movement is trending or chopping |
| Implied Volatility, IV | Option market premiums solved via pricing model | Forward-looking market expectation | Unsigned annualized % | Pricing expected future move into option expiration |
For deeper comparisons, see our Bollinger Bands trading guide and order types guide.
8. Step-by-step historical replay workflow for ATR volatility studies
When testing whether a volatility filter improves your setups, run a blind candle-by-candle replay in ChartMini Market Replay so future breakouts cannot bias your classification:
- Freeze your data controls up front: Record the symbol, timeframe, session template, ATR length of
14, Wilder RMA smoothing, and whether you are evaluating raw ATR orATRP. - Define an objective regime threshold from prior bars only: For example, classify a bar as compressed only when
ATRP(14)closes below its trailing 50-bar median—never by eyeballing the middle of a completed historical chart. - Hide future bars and step forward one closed candle at a time: Record candidate compression or expansion states at the bar close before advancing the replay.
- Log confirmed, failed, and ambiguous cases: Note when an overnight split, futures contract roll, or missing bar distorts the reading, and test your entry and stop rules using our manual backtesting guide.
Frequently asked questions
What is the True Range formula used by ATR?
True Range for bar t is the maximum of three nonnegative distances: current high minus current low, the absolute value of current high minus the previous close, and the absolute value of current low minus the previous close. All three inputs must come from the same session and adjustment series.
How is Wilder ATR initialized and updated?
J. Welles Wilder's standard implementation seeds the first n-period ATR with the simple arithmetic mean of the first n True Range values. Every subsequent bar updates recursively: Prior ATR multiplied by (n - 1), plus Current True Range, divided by n. Because it is recursive, platforms need a shared warm-up history to match.
How do you calculate Average True Range (ATR) in Excel?
With High in column C, Low in column D, and Close in column E starting at row 4, calculate True Range in F5 with =MAX(C5-D5, ABS(C5-E4), ABS(D5-E4)). Seed the first 14-period ATR in G17 with =AVERAGE(F4:F17), then drag down Wilder's smoothing formula in G18: =((G17*13)+F18)/14.
Why can two platforms show different ATR values?
Platforms can differ in smoothing mode (Wilder RMA vs. SMA or EMA), initial seed bar, loaded historical warm-up length, regular vs. extended session hours, daily cutoff timezone, split or dividend adjustments, and continuous futures roll back-adjustment.
Can raw ATR compare volatility across different instruments?
No. Raw ATR is denominated in the asset's native price units (dollars per share, pips, or index points). To compare relative volatility across assets at different price levels, normalize with ATR Percentage: (ATR / Close) × 100.
Is ATR the same as ADR, Bollinger Bands, ADX, or implied volatility?
No. ATR averages gap-adjusted True Range across any timeframe. ADR averages daily high-low bars without overnight gaps. Bollinger Bands plot standard deviation around a moving average. ADX measures directional trend strength, and implied volatility derives forward expectations from option prices.
Does rising or very low ATR predict the next price direction?
No. ATR is an unsigned volatility measure. Rising ATR shows expanding bar ranges during either rallies or selloffs, while low ATR shows range compression without telling you which way a future breakout will travel.
Sources and evidence boundaries
- TradingView: Average True Range (ATR): official True Range definition, 14-period baseline, and RMA/SMA/EMA/WMA smoothing selector.
- Fidelity: Average True Range: recursive Wilder smoothing formula and directionless volatility properties.
- TradingView: How ADR% and ATR% Are Calculated: ATR Percentage normalization (
ATR / Close × 100) and comparison against gap-free ADR. - TradingView: Configure Supercharts: session templates, timezone controls, dividend adjustments, and continuous futures settings.
- TradingView: Back-Adjustment for Continuous Futures: additive roll-gap adjustment mechanics on continuous futures charts.
- TradingView: Continuous Futures Contracts (
1!and2!): contract splicing and historical price adjustment boundaries. - TradingView: Adjust Data for Dividends: impact of dividend adjustments on historical OHLC bars.
- TradingView: Stock Splits: split recalculation rules across historical price series.
- CFTC: Commodity Trading Systems Sold on the Internet: regulatory disclosure on hypothetical backtest limitations.