Systemicbeta

Average True Range

systemic:core-atrIndicators

Inputs

NameTypeDescription
WindowWhole numberThe number of bars over which the True Range (TR) is averaged (commonly 14).
Price HighNumber seriesThe series of high prices, one value per bar.
Price LowNumber seriesThe series of low prices, one value per bar.
Price CloseNumber seriesThe series of closing prices, one value per bar.

Outputs

NameTypeDescription
ATRNumber seriesThe Average True Range (ATR): the smoothed average of the True Range over the window, one value per bar.

Cost

7
credits per run
1,000
bars

0.211 + 0.00607·n credits for n bars, rounded up. The marks are each plan's limit of bars.

A guide to the Average True Range (ATR): measuring volatility and setting risk levels in traditional and crypto markets.


Overview

The Average True Range (ATR) measures market volatility as the average range of price movement over a window of bars. J. Welles Wilder Jr. developed it in 1978. Traders use it to manage risk and spot breakouts in stocks, commodities, forex and cryptocurrencies.

Why ATR matters:

  • Volatility insight: Shows how much price moves, helping traders adapt to changing market conditions.
  • Risk management: Used to set stop-loss levels and position sizes based on current volatility.
  • Breakout detection: High ATR values often precede or confirm significant price moves.
  • Cross-asset utility: Applicable to any liquid market, including 24/7 crypto trading.

Quick links:


How It Works

ATR measures volatility by taking the greatest of three price ranges for each bar:

  1. Current high minus current low
  2. Absolute value of current high minus previous close
  3. Absolute value of current low minus previous close

The True Range (TR) is the maximum of these three values. The first bar has no previous close, so its TR is high minus low. ATR is then a smoothed average (Wilder's smoothing) of the TR over the window you set (e.g., 14 days).

Formulas

True Range (TR):

TRt=max⁡(Hight−Lowt,∣Hight−Closet−1∣,∣Lowt−Closet−1∣)\text{TR}_t = \max\left(\text{High}_t - \text{Low}_t, \left|\text{High}_t - \text{Close}_{t-1}\right|, \left|\text{Low}_t - \text{Close}_{t-1}\right|\right)

Average True Range (ATR):

The first ATR value, on bar nn, is the simple average of the first nn TR values:

ATRt=1n∑i=0n−1TRt−i\text{ATR}_t = \frac{1}{n} \sum_{i=0}^{n-1} \text{TR}_{t-i}

Every later bar uses Wilder's smoothing:

ATRt=(1n)×TRt+(n−1n)×ATRt−1\text{ATR}_t = \left(\frac{1}{n}\right) \times \text{TR}_t + \left(\frac{n-1}{n}\right) \times \text{ATR}_{t-1}

Where nn is the window (commonly 14). The bars before bar nn are empty.

Calculation Flow

flowchart TD
    A[Price Data: High, Low, Close] --> B[Compute TR for Each Bar]
    B --> C[Apply Wilder's Smoothing to TR]
    C --> D[Obtain ATR Series]

Interpretation and Use Cases

Typical Ranges

  • ATR values: Expressed in price units (e.g., dollars, BTC, etc.), not percent.
  • High ATR: Indicates high volatility; price is making large moves.
  • Low ATR: Indicates low volatility; price is consolidating or trending smoothly.

Signal Logic

  • Rising ATR: Volatility is increasing—often seen before or during breakouts, news events, or trend reversals.
  • Falling ATR: Volatility is decreasing—often seen during consolidations or trend exhaustion.
  • ATR spikes: Can signal the start of a new trend or a market shock.

Use Case 1: Setting Stop-Losses in Stock Trading

  • Scenario: A trader buys Apple stock and sets a stop-loss at 2x the current ATR below the entry price.
  • Interpretation: This approach adapts the stop to current volatility, reducing the chance of being stopped out by normal price swings.
  • Reference: Fidelity: ATR for Stop-Losses

Use Case 2: Volatility Breakout in Crypto

  • Scenario: Bitcoin's ATR rises sharply after a period of low volatility.
  • Interpretation: A surge in ATR may precede a breakout; traders may look for confirmation from price action to enter momentum trades.
  • Reference: Binance Academy: ATR in Crypto

Use Case 3: Position Sizing in Futures

  • Scenario: A futures trader sizes positions so that a 1 ATR move equals 1% of account equity.
  • Interpretation: This risk-based sizing helps standardize risk across trades, regardless of market volatility.
  • Reference: CME Group: Volatility and Position Sizing

Use Case 4: Comparing Volatility Across Assets

  • Scenario: Comparing ATR values of S&P 500, Gold, and Bitcoin to assess which market is most volatile.
  • Interpretation: Higher ATR means greater price swings; useful for portfolio allocation and risk budgeting.

Decision Flow Example

flowchart TD
    S[New Trade Setup] --> A{ATR Rising?}
    A -->|Yes| B[Expect Volatility: Consider Breakout or Trend Trade]
    A -->|No| C{ATR Falling?}
    C -->|Yes| D[Expect Consolidation: Use Tighter Stops or Wait]
    C -->|No| E[ATR Stable: Use Standard Strategy]

Comparison: ATR vs. Other Volatility Indicators

IndicatorMeasuresOutputBest For
ATRAbsolute price rangePrice unitsStop-losses, volatility regime
Bollinger BandsStandard deviationBands around priceOverbought/oversold, breakouts
VIXImplied volatility (S&P 500)PercentMacro risk, cross-asset signals
Historical VolatilityStd. dev. of returnsPercentOption pricing, risk models
  • ATR uses absolute price moves, so its values are in the asset's own price units.
  • Bollinger Bands and Historical Volatility use standard deviation, so they are more sensitive to outliers.
  • VIX is a market-wide measure, not asset-specific.

Practical Example

Suppose you have the following daily prices:

  • Day 1: High = $50, Low = $45, Close = $48
  • Day 2: High = $52, Low = $46, Close = $50
  • Day 3: High = $53, Low = $49, Close = $51

Step 1: Calculate TR for Day 2:

  • High - Low = $52 - $46 = $6
  • |High - Previous Close| = |$52 - $48| = $4
  • |Low - Previous Close| = |$46 - $48| = $2
  • TR = max(6, 4, 2) = $6

Step 2: Calculate ATR with a window of 3:

  • TR Day 1: $5 (High - Low, because there is no previous close)
  • TR Day 2: $6
  • TR Day 3: $4
  • ATR on Day 3 = (5 + 6 + 4) / 3 = $5. Days 1 and 2 are empty because the window is not yet full.
DayHighLowCloseTRATR
15045485
25246506
353495145

ATR Calculation Flow

flowchart TD
    P[Price Data] --> Q[Compute TR]
    Q --> R[Apply Wilder's Smoothing]
    R --> S[Get ATR]

Advantages and Limitations

Advantages:

  • Provides a clear, objective measure of volatility (Investopedia)
  • Adapts to changing market conditions
  • Useful for risk management and trade sizing
  • Works across all asset classes and timeframes

Limitations:

  • Lagging indicator—reacts to past price moves (Binance Academy)
  • Does not indicate trend direction, only volatility
  • The window needs adjusting for different assets or strategies
  • Not predictive—should be combined with other tools for entries/exits

References and Further Reading


Glossary

  • Volatility: The degree of variation in price over time
  • True Range (TR): The greatest of three price ranges for a bar
  • Moving Average: A smoothing technique to reduce noise in data
  • Breakout: A price move outside a defined range, often with increased volatility
  • Stop-Loss: An order to sell an asset when it reaches a certain price, used to limit losses
  • Position Sizing: Adjusting trade size based on risk and volatility

For best results, use ATR alongside trend and momentum indicators, and always test your strategy on historical data first.


Indicator Assessment

---
config:
  xyChart:
    width: 600
    height: 400
  themeVariables:
    xyChart:
      plotColorPalette: "#27ae60, #e74c3c"
---
xychart-beta horizontal
    title "ATR Indicator Assessment (Scale: 1-10)"
    x-axis ["Popularity", "Reliability", "Complexity", "Versatility", "Recent Interest"]
    y-axis "Score" 0 --> 10
    bar [9, 8, 2, 9, 7]
    bar [8, 8, 2, 9, 8]

Legend: First bar (green) = Equities/Forex | Second bar (red) = Cryptocurrency

Dimension Explanations

DimensionEquities/ForexCryptoRationale
Popularity98One of the most cited volatility indicators; developed by J. Welles Wilder (same author as RSI). Standard on virtually all charting platforms. Widely adopted in crypto for position sizing.
Reliability88Excellent for measuring realized volatility. Non-directional, so it provides objective volatility readings regardless of trend. Equally reliable in 24/7 crypto markets.
Complexity22Simple three-component formula with straightforward interpretation. Higher ATR = more volatility. One of the easiest indicators to understand.
Versatility99Universal applicability: stop-loss placement, position sizing, breakout detection, volatility regime identification. Works across all timeframes and asset classes.
Recent Interest78Consistent strong interest in traditional markets. Growing adoption in crypto for risk management and automated trading systems. Featured in many algorithmic strategies.
Rendering diagrams...
© 2026 WanoLabs. All rights reservedBeta v0.1.5