Developed by J. Welles Wilder, the Average True Range (ATR) is an indicator that measures volatility. As with most of his indicators, Wilder designed ATR with commodities and daily prices in mind. Commodities are frequently more volatile than stocks. They were are often subject to gaps and limit moves, which occur when a commodity opens up or down its maximum allowed move for the session. A volatility formula based only on the highlow range would fail to capture volatility from gap or limit moves. Wilder created Average True Range to capture this “missing” volatility. It is important to remember that ATR does not provide an indication of price direction, just volatility.
Wilder features ATR in his 1978 book, New Concepts in Technical Trading Systems. This book also includes the Parabolic SAR, RSI and the Directional Movement Concept (ADX). Despite being developed before the computer age, Wilder’s indicators have stood the test of time and remain extremely popular.
True Range
Wilder started with a concept called True Range (TR), which is defined as the greatest of the following:

Method 1: Current High less the current Low

Method 2: Current High less the previous Close (absolute value)

Method 3: Current Low less the previous Close (absolute value)
Absolute values are used to ensure positive numbers. After all, Wilder was interested in measuring the distance between two points, not the direction. If the current period’s high is above the prior period’s high and the low is below the prior period’s low, then the current period’s highlow range will be used as the True Range. This is an outside day that would use Method 1 to calculate the TR. This is pretty straight forward. Methods 2 and 3 are used when there is a gap or an inside day. A gap occurs when the previous close is greater than the current high (signaling a potential gap down or limit move) or the previous close is lower than the current low (signaling a potential gap up or limit move). The image below shows examples of when methods 2 and 3 are appropriate.
Example A: A small high/low range formed after a gap up. The TR equals the absolute value of the difference between the current high and the previous close.
Example B: A small high/low range formed after a gap down. The TR equals the absolute value of the difference between the current low and the previous close.
Example C: Even though the current close is within the previous high/low range, the current high/low range is quite small. In fact, it is smaller than the absolute value of the difference between the current high and the previous close, which is used to value the TR.
Calculation
Typically, the Average True Range (ATR) is based on 14 periods and can be calculated on an intraday, daily, weekly or monthly basis. For this example, the ATR will be based on daily data. Because there must be a beginning, the first TR value is simply the High minus the Low, and the first 14day ATR is the average of the daily TR values for the last 14 days. After that, Wilder sought to smooth the data by incorporating the previous period’s ATR value.
Current ATR = [(Prior ATR x 13) + Current TR] / 14
– Multiply the previous 14day ATR by 13.
– Add the most recent day’s TR value.
– Divide the total by 14