Atr

Updated: September 24, 2025

What is the Average True Range (ATR)?
– Definition: The Average True Range (ATR) is a volatility indicator that quantifies how much an asset’s price typically moves over a given period. It was introduced by J. Welles Wilder Jr. and is commonly used with a 14-period default.
– Key idea: ATR measures the size of price moves (the “range”), including gaps between sessions, rather than direction (up or down).

Core definitions
– True Range (TR): For a single period, TR is the largest of:
1) today’s high minus today’s low,
2) the absolute difference between today’s high and yesterday’s close,
3) the absolute difference between today’s low and yesterday’s close.
– Average True Range (ATR): A moving average of TR values over n periods. The standard n is 14, but traders may shorten n to make ATR more responsive or lengthen n to smooth it.

Formulas
– TR = max( H − L, |H − C_prev|, |L − C_prev| )
where H = today’s high, L = today’s low, C_prev = yesterday’s close.
– Initial ATR (when no prior ATR exists) = (1/n) * Σ(TR_i) for i = 1 to n (the simple average of the first n TRs).
– Smoothed ATR (recursive, for subsequent periods):
ATR_t = [ (ATR_{t−1} * (n − 1)) + TR_t ] / n
This is Wilder’s smoothing method; it behaves like an exponential-moving average with a specific weighting.

Step-by-step checklist to compute ATR (daily data)
1. Gather n+1 close prices and the high/low for each of the n most recent periods.
2. For each period, compute TR using the three-term max formula.
3. If you are computing the first ATR, average the first n TR values.
4. For each new period after the initial ATR, apply the smoothing formula: ATR_t = [(ATR_{t−1}*(n−1)) + TR_t]/n.
5. Plot ATR as a separate line (it’s not directional). Compare current ATR to historical ATR for the same asset to judge relative volatility.

Worked numeric example (true range only; initial ATR needs n TRs)
– Given (single day):
– Today’s high (H) = $21.95
– Today’s low (L) = $20.22
– Yesterday’s close (C_prev) = $21.51
– Compute the three candidates:
– H − L = $21.95 − $20.22 = $1.73
– |H − C_prev| = |$21.95 − $21.51| = $0.44
– |L − C_prev| = |$20.22 − $21.51| = $1.29
– True Range (TR) = the largest of these = $1.73.
– Note: To obtain a standard 14-period

ATR, you need 14 TR values. The first (initial) 14-period ATR is simply the arithmetic average of the first 14 true-range (TR) values:

– ATR_14 = (TR_1 + TR_2 + … + TR_14) / 14.

After you have that initial ATR_14, use the Wilder smoothing formula for each subsequent day t:

– ATR_t = [(ATR_{t−1} × (n − 1)) + TR_t] / n, where n = 14 for the standard ATR.

Worked numeric continuation (using the single-day TR from earlier = $1.73)

1) Suppose the prior 14 TRs (TR_1 through TR_14) are:
1.20, 1.35, 1.10, 1.50, 1.40, 1.60, 1.80, 1.25, 1.55, 1.70, 1.45, 1.60, 1.30, 1.40
Sum = 20.20

2) Compute the initial 14-period ATR:
ATR_14 = 20.20 / 14 = 1.4429 (round to $1.44)

3) Compute the next-day ATR (ATR_15) using TR_15 = $1.73:
ATR_15 = [(1.4429 × 13) + 1.73] / 14
= (18.7577 + 1.73) / 14
= 20.4877 / 14
= 1.4634 (≈ $1.46)

Interpretation of the numeric example
– ATR rose from $1.44 to $1.46; volatility increased slightly.
– ATR is non-directional: it measures the size of price moves, not whether price is going up or down.

Practical uses (step-by-step, with examples)
1) Volatility comparison across time:
– Compare the current ATR to its historical range (e.g., 14-period ATR vs. 90-period ATR average) to see if volatility is high or low.

2) Position sizing (simple volatility-based method):
– Decide a fixed risk per trade in dollars (e.g., $200).
– Choose a stop distance in ATR multiples (common choices: 1×, 1.5×, 2× ATR).
– Position size = Risk per trade / (stop-distance per share).
Example: Entry $22.00, ATR = $1.46, stop = Entry − 1.5×ATR = 22 − (1.5×1.46) = 19.81 → stop distance ≈ $2.19.
If risk per trade = $200, shares = 200 / 2.19 ≈ 91 shares.

3) Stop placement guidance:
– Use ATR to set stops that adapt to market volatility (wider stops in volatile markets, tighter in calm markets).
– Common rule: stop = entry − k×ATR

k is chosen based on your time horizon and how much natural price fluctuation you’re willing to tolerate. Common choices:
– 1× ATR — tight stops for short, high-frequency setups.
– 1.5× ATR — moderate compromise between noise and protection.
– 2×–3× ATR — wider stops for trend-following or when avoiding whipsaws.

Trailing stops using ATR
– Basic trailing stop (long): stop = highest price since entry − k × ATR.
– Basic trailing stop (short): stop = lowest price since entry + k × ATR.
– Implementation steps:
1. Record entry price and ATR at entry.
2. Update ATR each bar (ATR changes with volatility).
3. Update highest (or lowest) price since entry.
4. Recalculate trailing stop and only move the stop in the direction of locking profit (for longs, only raise the stop; for shorts, only lower it).

Worked trailing-stop example
– Account: no figure needed for stop logic. Entry at $45.00, ATR at entry = $0.90, k = 2.
– Highest price since entry rises to $49.20.
– Trailing stop = 49.20 − (2 × 0.90) = 49.20 − 1.80 = $47.40.
– If price later falls to $47.40, the stop executes (or you exit manually).

Position sizing — percent-risk method (step-by-step)
1. Choose account equity and percent risk per trade (e.g., $50,000 and 1% → $500 risk).
2. Choose ATR and k (e.g., ATR = $0.80, k = 2 → stop distance = 1.60).
3. Shares to buy = Risk per trade / stop distance.
– Example: Shares = $500 / $1.60 ≈ 312 shares.
4. Round down to whole shares and account for commissions/slippage.

Checklist for using ATR in position sizing and stops
– Confirm ATR period (14 is typical) and timeframe (daily vs intraday).
– Choose k consistent with your edge and timeframe.
– Normalize ATR for comparisons: ATR% = ATR / price (useful across different-priced stocks).
– Factor commissions, overnight gaps, and slippage into your stop distance or position size.
– Recalculate position size if ATR or account equity changes materially before the trade.

ATR calculation refresher (Wilder method)
– True Range (TR) for the current bar = max(High − Low, |High − PrevClose|, |Low − PrevClose|).
– Initial ATR (first n periods) = simple average of TR over n bars.
– Wilder’s smoothed ATR (subsequent bars): ATR_t = [(ATR_{t−1} × (n − 1)) + TR_t] / n.
– Typical n = 14. This smoothing gives ATR a reaction similar to an exponential moving average but with Wilder’s specific weighting.

Numeric ATR calculation example (short)
– Period n = 5 (for demonstration). TRs for five bars: 0.90, 1.20, 0.60, 1.10, 0.80.
– Initial ATR = (0.90 + 1.20 + 0.60 + 1.10 + 0.80) / 5 = 4.60 / 5 = 0.92.
– Next bar TR = 1.00 → ATR_next = [(0.92 × (5 − 1)) + 1.00] / 5 = [(0.92 × 4) + 1.00] / 5 = (3.68 + 1.00) / 5 = 0.