Hubbry Logo
Average true rangeAverage true rangeMain
Open search
Average true range
Community hub
Average true range
logo
7 pages, 0 posts
0 subscribers
Be the first to start a discussion here.
Be the first to start a discussion here.
Average true range
Average true range
from Wikipedia

Average true range (ATR) is a technical analysis volatility indicator originally developed by J. Welles Wilder, Jr. for commodities.[1][2] The indicator does not provide an indication of price trend, simply the degree of price volatility.[3] The average true range is an N-period smoothed moving average (SMMA) of the true range values. Wilder recommended a 14-period smoothing.[4]

Calculation

[edit]
MetaTrader EUR/USD chart showing ATR indicator (cyan line) with period 14.

The range of a day's trading is simply . The true range extends it to yesterday's closing price if it was outside of today's range.

The true range is the largest of the:

  • Most recent period's high minus the most recent period's low
  • Absolute value of the most recent period's high minus the previous close
  • Absolute value of the most recent period's low minus the previous close

The formula can be simplified to:

The ATR at the moment of time t is calculated using the following formula: (This is one form of an exponential moving average)

The first ATR value is calculated using the arithmetic mean formula:

N.B. This first value is the first in the time series (not the most recent) and is n periods from the beginning of the chart.

The idea of ranges is that they show the commitment or enthusiasm of traders. Large or increasing ranges suggest traders prepared to continue to bid up or sell down a stock through the course of the day. Decreasing range suggests waning interest.

Applicability to futures contracts vs. stocks

[edit]

Since true range and ATR are calculated by subtracting prices, the volatility they compute does not change when historical prices are back-adjusted by adding or subtracting a constant to every price. Back-adjustments are often employed when splicing together individual monthly futures contracts to form a continuous futures contract spanning a long period of time. However the standard procedures used to compute volatility of stock prices, such as the standard deviation of logarithmic price ratios, are not invariant (to addition of a constant). Thus futures traders and analysts typically use one method (ATR) to calculate volatility, while stock traders and analysts typically use standard deviation of log price ratios.

Use in position size calculation

[edit]

Apart from being a trend strength gauge, ATR serves as an element of position sizing in financial trading. Current ATR value (or a multiple of it) can be used as the size of the potential adverse movement (stop-loss distance) when calculating the trade volume based on trader's risk tolerance. In this case, ATR provides a self-adjusting risk limit dependent on the market volatility for strategies without a fixed stop-loss placement.[citation needed]

References

[edit]
Revisions and contributorsEdit on WikipediaRead on Wikipedia
from Grokipedia
The Average True Range (ATR) is a technical analysis indicator developed by J. Welles Wilder Jr. in his 1978 book New Concepts in Technical Trading Systems to quantify the volatility of an asset's price movements over a specified period, typically 14 days, without indicating price direction. It builds on the concept of true range, which captures the full extent of price variation by considering the greatest of three values: the current period's high minus low, the absolute difference between the current high and previous close, or the absolute difference between the current low and previous close, thereby accounting for overnight gaps or limit moves common in commodities trading. The ATR value is computed as a smoothed of these true range figures, using Wilder's formula: (previous ATR × 13 + current true range) ÷ 14 for the standard 14-period setup, which provides a responsive yet stable measure of recent volatility trends. Rising ATR levels signal increasing volatility, often associated with strong directional trends or breakouts, while declining values suggest consolidation or reduced market activity, helping traders assess risk exposure across stocks, forex, or futures. In practice, ATR serves multiple roles in trading strategies, such as establishing trailing stop-loss levels by adding a multiple of ATR (e.g., 2× or 3×) to entry prices for dynamic , or normalizing volatility comparisons via the Average True Range Percent (ATRP = (ATR ÷ close price) × 100) to evaluate securities of varying price scales. Wilder originally designed it for commodities but it has since become a foundational tool in modern , integrated into platforms like those from and StockCharts for scanning high-volatility opportunities or validating price expansions.

Overview and History

Definition and Purpose

The Average True Range (ATR) is a designed to measure market volatility by calculating the average of the true range values over a specified period, most commonly 14 days. It provides an objective assessment of the extent of price fluctuations in a , capturing the full scope of daily price movements without regard to their directional bias. The true range serves as the foundational daily measure for this calculation, incorporating the high-low range alongside any gaps from the previous close. The primary purpose of the ATR is to assist traders in evaluating the magnitude of price movements, enabling them to adapt trading strategies to prevailing market conditions and manage associated risks more effectively. By focusing solely on volatility rather than predicting price direction, it helps in setting realistic expectations for potential price swings and in calibrating position sizes or stop-loss levels accordingly. In financial markets, volatility refers to the degree of variation in trading prices over time, often manifesting as rapid or erratic changes that can amplify both opportunities and risks. The ATR quantifies this volatility in absolute price units, such as dollars for or points for indices, offering a practical metric that scales with the asset's . This indicator was introduced by J. Welles Wilder in his 1978 book New Concepts in Technical Trading Systems, where it was presented as a tool for trading but has since become widely applicable across various .

Development by J. Welles Wilder

, an American mechanical engineer who transitioned into trading and , created the Average True Range (ATR) indicator during the 1970s as a means to quantify market volatility more effectively. Born in 1935 and passing away in 2021, Wilder applied his engineering background to financial markets, seeking to develop tools that addressed practical challenges in trading commodities, where price gaps and erratic movements were prevalent. The ATR was first introduced in Wilder's seminal 1978 book, New Concepts in Technical Trading Systems, where it appeared alongside other influential indicators such as the (RSI) and . Wilder's primary motivation was to overcome the shortcomings of traditional range measurements, which often failed to capture true price volatility in futures and commodities markets due to overnight gaps and non-continuous trading. By focusing on the "true range"—the greatest of the current high-low difference, the of the high minus the previous close, or the of the low minus the previous close—Wilder aimed to provide traders with a robust, gap-inclusive metric for assessing market dynamism. Since its inception, the ATR has seen widespread adoption in contemporary trading platforms, including and 5, where it is integrated as a standard volatility tool, and , which supports customizable implementations for real-time analysis. While practitioners have experimented with variations in the smoothing period—such as the original 14 periods versus 20 for longer-term assessments based on results—the core methodology has remained unaltered since 1978. Wilder's broader contributions emphasized the creation of practical, responsive indicators that minimize lag, enabling more effective trend-following strategies in volatile environments.

Calculation Methods

True Range Components

The true range (TR) serves as the foundational component for calculating the average true range (ATR), representing the maximum price movement over a single trading period, such as a day. It is defined as the greatest of three possible values: the difference between the current period's high and low prices, the absolute value of the current high minus the previous period's closing price, or the absolute value of the current low minus the previous period's closing price. This definition, introduced by J. Welles Wilder Jr. in his 1978 book New Concepts in Technical Trading Systems, assumes familiarity with basic candlestick chart elements like high (H), low (L), and close (C). The mathematical formula for true range is: TR=max[(HL),HCprev,LCprev]\text{TR} = \max[(H - L), |H - C_{\text{prev}}|, |L - C_{\text{prev}}|] where HH is the current high, LL is the current low, and CprevC_{\text{prev}} is the previous close. The use of the maximum function ensures that TR captures the largest extent of price variation, while absolute values prevent negative results from directional differences. This formulation accounts for overnight or inter-period gaps in pricing, which are common in non-24-hour markets like and commodities, where trading halts can lead to opening prices significantly different from the prior close. By incorporating the gaps via HCprev|H - C_{\text{prev}}| and LCprev|L - C_{\text{prev}}|, TR provides a more complete measure of volatility than a simple high-low range, which might understate movement if a gap exceeds intraday fluctuations. For instance, consider a that closes at $50 on day 1. On day 2, it gaps down to open at $48, reaching a high of $49 and a low of $47. The high-low range is $49 - $47 = $2,but, but |H - C_{\text{prev}}| = |49 - 50| = $1andand|L - C_{\text{prev}}| = |47 - 50| = $3. Thus, TR = max[$2, $1, $3] = $3, reflecting the full gap-influenced volatility beyond the intraday range.

Computing the Average True Range

The Average True Range (ATR) is computed as an exponential moving average (EMA) of true range values over a specified number of periods, n, with a typical default of 14 periods as originally recommended by . This approach smooths the true range data to provide a measure of volatility that responds more quickly to recent price action compared to equal-weighted averages. To initialize the ATR, the first value is calculated as the simple average of the true ranges over the initial n periods: Initial ATR=1ni=1nTRi\text{Initial ATR} = \frac{1}{n} \sum_{i=1}^{n} \text{TR}_i where TRi\text{TR}_i is the true range for each of the first n periods. Subsequent ATR values are then updated using Wilder's formula, which applies a weighting factor of 1/n1/n: ATRt=ATRt1×(n1)+TRtn\text{ATR}_t = \frac{\text{ATR}_{t-1} \times (n-1) + \text{TR}_t}{n} Here, ATRt\text{ATR}_t is the current ATR, ATRt1\text{ATR}_{t-1} is the previous ATR, and TRt\text{TR}_t is the current true range. This method, equivalent to an EMA with a smoothing constant of 1/n1/n, was introduced by Wilder in his 1978 book New Concepts in Technical Trading Systems. While Wilder's method remains the standard for its reduced lag in volatility estimation, some trading platforms and analysts use a simple moving average (SMA) of the true ranges instead: ATRt=1ni=tn+1tTRi\text{ATR}_t = \frac{1}{n} \sum_{i=t-n+1}^{t} \text{TR}_i The SMA assigns equal weight to all n periods, which can introduce more lag but simplifies computation. For illustration, consider n = 3 and initial true range values of 2.5, 3.0, and 2.8. The initial ATR is (2.5+3.0+2.8)/3=2.77(2.5 + 3.0 + 2.8)/3 = 2.77. For the next period with TRt=2.9\text{TR}_t = 2.9, the updated ATR is (2.77×2+2.9)/3=2.81(2.77 \times 2 + 2.9)/3 = 2.81. This process continues iteratively for each new true range. The choice of period n affects the ATR's sensitivity; Wilder's default of 14 is suited for daily charts, while shorter periods (e.g., 7) are common for intraday trading to capture rapid volatility shifts, and longer periods (e.g., 20–50) for weekly or monthly charts to smooth longer-term trends. For practical implementation in Python using the pandas library, the following function computes the ATR according to Wilder's method:

python

def atr(df, period=14): high_low = df['High'] - df['Low'] high_close = np.abs(df['High'] - df['Close'].shift()) low_close = np.abs(df['Low'] - df['Close'].shift()) tr = pd.concat([high_low, high_close, low_close], axis=1).max(axis=1) return tr.ewm(alpha=1/period, adjust=False).mean()

def atr(df, period=14): high_low = df['High'] - df['Low'] high_close = np.abs(df['High'] - df['Close'].shift()) low_close = np.abs(df['Low'] - df['Close'].shift()) tr = pd.concat([high_low, high_close, low_close], axis=1).max(axis=1) return tr.ewm(alpha=1/period, adjust=False).mean()

Interpretation and Volatility Measurement

Understanding ATR Values

The (ATR) provides a measure of market volatility in absolute terms, where higher values signify greater fluctuations over the specified period. For instance, an ATR value of 2 indicates that the asset has experienced an average daily range of $2, reflecting the typical extent of movement traders might expect. However, because ATR is expressed in the asset's units, its absolute value scales directly with the of the , making it less suitable for direct comparisons across different assets without adjustment. To enable cross-asset comparisons, ATR can be normalized as a percentage of the asset's , often denoted as ATR percent (ATRP = (ATR / Close price) × 100). This adjustment expresses volatility relative to the asset's value, such as a 2% ATRP indicating that the average daily range represents 2% of the current , allowing traders to gauge between securities of varying price levels. Trends in ATR values offer insights into evolving market conditions: a rising ATR suggests increasing volatility, which may precede significant price breakouts or heightened uncertainty, while a falling ATR points to decreasing volatility and potential market consolidation. These trends are derived from the smoothed average of true ranges, as originally outlined by J. Welles Wilder. There are no universal thresholds for ATR values, as interpretations depend on the asset and timeframe; instead, values are assessed relative to historical norms, such as when the current ATR exceeds twice the long-term average, signaling unusually high volatility. A key limitation of ATR is that it measures only the magnitude of price movements without indicating direction, making it a neutral volatility gauge that benefits from pairing with directional indicators like the Average Directional Index (ADX), also developed by Wilder, to assess trend strength. For example, during a company's earnings season, a stock's ATR might rise from 1.5 to 3.0, implying greater expected swings and the need for wider stop-loss placements to accommodate the heightened volatility.

Signals and Thresholds in Trading

In trading, the Average True Range (ATR) generates breakout signals by identifying significant movements relative to recent volatility. Traders enter long positions when the price closes above the previous close plus one times the ATR, signaling a potential upward breakout, while short positions are entered when the price closes below the previous close minus one times the ATR. This approach, rooted in volatility breakout systems, helps filter out minor fluctuations and capture directional moves. Stop-loss placement often incorporates ATR multiples to accommodate normal volatility and avoid premature exits. A common method sets initial stops at two to three times the ATR below the entry price for long trades, ensuring the stop reflects the asset's typical range rather than arbitrary levels. Trailing stops further utilize ATR for dynamic adjustment; the Chandelier Exit, for instance, trails the stop below the highest high since entry by three times the 22-period ATR, locking in profits during trends while allowing room for volatility. Thresholds based on ATR values serve as filters to select trades in appropriate volatility conditions. Traders may avoid entries in low or high volatility environments to prioritize conditions where volatility supports strategy execution without undue whipsaws. A practical example in a trending market involves buying if the close exceeds the previous close plus 1.5 times the ATR, with a stop-loss at the entry minus two times the ATR; this setup captures while protecting against typical retracements within the asset's volatility profile.

Applications in Trading

Differences in Futures and Stocks

The Average True Range (ATR) exhibits distinct behaviors when applied to futures contracts compared to equity stocks, primarily due to differences in , trading hours, and inherent volatility profiles. Futures markets, such as those for commodities and indices, operate nearly 24 hours a day, which minimizes price gaps between sessions and results in more continuous intraday price action. This continuity leads to relatively stable ATR readings during trading hours, as the true range component less frequently relies on the previous close to capture overnight discontinuities. In contrast, stock markets are limited to specific hours, making intraday gaps common from after-hours news or events, which the ATR incorporates through its previous close calculation to reflect total volatility. Leverage in futures trading amplifies effective volatility, as small movements translate to larger impacts per , often measured in points (e.g., for futures) or adjusted for tick sizes like 0.01 for crude oil contracts. ATR in futures thus serves as a critical tool for managing this amplified , with values typically expressed relative to contract specifications. For , however, volatility spikes are more pronounced during releases or major news, elevating ATR temporarily, and the indicator must account for corporate actions such as dividends or splits, which require adjustments to maintain accurate range calculations and avoid distortions in historical volatility. Originally developed by J. Welles Wilder for commodities and futures markets, where daily prices exhibit higher baseline volatility than many stocks, the standard 14-period ATR aligns well with these assets' smoother trends. Stocks, prone to noisier price action from idiosyncratic events, often benefit from shorter periods like 10 days to filter out irrelevant fluctuations and focus on recent volatility. Key differences include futures' more consistent intraday ATR stability versus stocks' event-driven surges, and the necessity to normalize futures ATR by multiplying by the multiplier (e.g., 50 for S&P 500 E-mini) for cross-asset comparability in dollar terms. For instance, a typical ATR for crude oil futures might be around $1.50 per barrel, reflecting broad market swings, while Apple's stock ATR could approximate $3 per share, underscoring scale variations despite similar percentage volatilities.

Role in Position Sizing

The Average True Range (ATR) plays a crucial role in position sizing by enabling traders to allocate capital in a manner that limits to a consistent of their total account equity, typically 1-2%, based on the anticipated loss from the entry price to the stop-loss level. This volatility-adjusted approach ensures that position sizes are scaled according to market conditions, avoiding disproportionate exposure when price swings are larger. By incorporating ATR, traders can maintain uniform across trades despite varying asset volatilities, which is a foundational aspect of sound in technical trading systems. The standard formula for calculating position size using ATR is: Position Size=Account Risk AmountStop Distance (in ATR multiples)×ATR Value\text{Position Size} = \frac{\text{Account Risk Amount}}{\text{Stop Distance (in ATR multiples)} \times \text{ATR Value}} For instance, on a account with a 1% tolerance ($1,000 at risk) and a stop-loss set at 2 times the ATR, if the current ATR is 1.5, the position size would be $1,000 / (2 \times 1.5) = $333.33 worth of the asset (adjusted for share price or contract value). This method directly ties position allocation to measurable volatility, allowing for dynamic adjustments as ATR fluctuates. Van Tharp further refined this in his volatility model, where ATR serves as the volatility proxy in trend-following systems, inversely scaling position sizes to keep the per unit of volatility constant across instruments. Benefits of ATR-based position sizing include preventing overexposure during elevated volatility, as higher ATR values automatically reduce the number of units traded, thereby capping potential losses. For example, with a $50,000 account risking 1% ($500), an ATR of 2, and a stop-loss at 3 times ATR (distance of 6 points), the position size calculates to $500 / 6 ≈ 83 shares, assuming a $1 risk per share. This contrasts with fixed fractional sizing, which risks a set without volatility adjustment; ATR-normalized variations, however, demonstrate reduced maximum drawdowns in backtested scenarios by better aligning exposure with market regime changes. Stop placements often use ATR multiples for consistency, further integrating the indicator into overall protocols.

References

Add your contribution
Related Hubs
User Avatar
No comments yet.