# Differences

This shows you the differences between two versions of the page.

 — technical_indicators:average_true_range_atr [2019/06/24 19:39] (current) Line 1: Line 1: + ====== Average True Range (ATR) ====== + + ===== Introduction ===== + + Developed by J. Welles Wilder, the Average True Range (ATR) is an indicator that measures [[:​glossary_v#​volatility|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 high-low 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 high-low 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 straightforward. 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. ​ + + {{:​technical_indicators:​average_true_range_atr:​atr-1-trexam.png|ATR - True Range Image}} + + 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 14-day 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. + + <​code>​ + + Current ATR = [(Prior ATR x 13) + Current TR] / 14 + + - Multiply the previous 14-day ATR by 13. + - Add the most recent day's TR value. + - Divide the total by 14 + + ​ + + {{:​technical_indicators:​average_true_range_atr:​atr-2-qqqqsh.png|ATR - Spreadsheet}} + + {{:​technical_indicators:​average_true_range_atr:​cs-atr.xls?​linkonly|Click here for an Excel Spreadsheet}} showing the start of an ATR calculation for QQQ. + + In the spreadsheet example, the first True Range value (.91) equals the High minus the Low (yellow cells). The first 14-day ATR value (.56) was calculated by finding the average of the first 14 True Range values (blue cell). Subsequent ATR values were smoothed using the formula above. The spreadsheet values correspond with the yellow area on the chart below; notice how ATR surged as QQQ plunged in May with many long candlesticks. ​ + + {{:​technical_indicators:​average_true_range_atr:​atr-3-qqqqexam.png|ATR - Chart 1}} + + For those trying this at home, a few caveats apply. First, just like with [[:​technical_indicators:​moving_averages#​ema_accuracy|Exponential Moving Averages (EMAs)]], ATR values depend on how far back you begin your calculations. The first True Range value is simply the current High minus the current Low and the first ATR is an average of the first 14 True Range values. The real ATR formula does not kick in until day 15. Even so, the remnants of these first two calculations "​linger"​ to slightly affect subsequent ATR values. Spreadsheet values for a small subset of data may not match exactly with what is seen on the price chart. Decimal rounding can also slightly affect ATR values. On our charts, we calculate back at least 250 periods (typically much further), to ensure a much greater degree of accuracy for our ATR values. + + ===== Absolute ATR ===== + + ATR is based on the True Range, which uses absolute price changes. As such, ATR reflects volatility as absolute level. In other words, ATR is not shown as a percentage of the current close. This means low-priced stocks will have lower ATR values than high price stocks. For example, a \$20-30 security will have much lower ATR values than a \$200-300 security. Because of this, ATR values are not comparable. Even large price movements for a single security, such as a decline from 70 to 20, can make long-term ATR comparisons impractical. Chart 4 shows Google with double-digit ATR values and chart 5 shows Microsoft with ATR values below 1. Despite different values, their ATR lines have similar shapes. + + {{:​technical_indicators:​average_true_range_atr:​atr-4-googhigh.png?​nolink&​}} + + {{:​technical_indicators:​average_true_range_atr:​atr-5-mfstlow.png?​nolink&​}} + + ===== Conclusion ===== + + ATR is not a directional indicator like MACD or RSI, but rather a unique volatility indicator that reflects the degree of interest or disinterest in a move. Strong moves, in either direction, are often accompanied by large ranges, or large True Ranges. This is especially true at the beginning of a move. Uninspiring moves can be accompanied by relatively narrow ranges. As such, ATR can be used to validate the enthusiasm behind a move or breakout. A bullish reversal with an increase in ATR would show strong buying pressure and reinforce the reversal. A bearish support break with an increase in ATR would show strong selling pressure and reinforce the support break. ​ + + ===== Using with SharpCharts ===== + + Listed as "​Average True Range,"​ ATR is on the Indicators drop-down menu.  The "​parameters"​ box to the right of the indicator contains the default value, 14, for the number of periods used to smooth the data. To adjust the period setting, highlight the default value and enter a new setting. In his work, Wilder often used an 8-period ATR. SharpCharts also allows users to position the indicator above, below or behind the price plot. A moving average can be added to identify upturns or downturns in ATR. Click "​advanced options"​ to add a moving average as an indicator overlay. [[https://​stockcharts.com/​h-sc/​ui?​s=\$INDU&​p=D&​b=5&​g=0&​id=p51341747448&​listNum=30&​a=202613287|Click here]] for a live example of ATR. + + {{:​technical_indicators:​average_true_range_atr:​atr-6-shch.png|ATR - SharpCharts}} + + ===== Suggested Scans ===== + + ==== Weeding Out High Volatility ==== + The Average True Range indicator can be used in scans to weed out securities with extremely high volatility. This simple scan searches for S&P 600 stocks that are in an uptrend. The final scan clause excludes high volatility stocks from the results. Note that the ATR is converted to a percentage of sorts so that the ATR of different stocks can be compared on the same scale. + <​code>​ + [group is SP600] + AND [Daily EMA(50,​close) > Daily EMA(200,​close)]  ​ + + AND [ATR(250) / SMA(20,​Close) * 100 < 4] + ​ + + For more details on the syntax to use for ATR scans, please see our [[docs>​scans:​indicators#​average_true_range_atr|Scanning Indicator Reference]] in the Support Center. + + + ===== Additional Resources ===== + ==== Stocks & Commodities Magazine Articles ==== + + **[[http://​stockcharts.com/​h-mem/​tascredirect.html?​artid=\V20\C03\054ATR.pdf|Working Money: Average True Range by Sharon Yamanaka]]**\\ + Feb 2002  -  Stocks & Commodities + + **[[http://​stockcharts.com/​h-mem/​tascredirect.html?​artid=\V19\C06\067VOL.pdf|Which Volatility Measure? by Gordon Gustafson]]**\\ + May 2001  -  Stocks & Commodities V. 19:6 (46-50) 