Average True Range
The Average True Range (ATR) indicator was developed by J. Welles Wilder and is used to measure volatility. It uses High, Low and Close prices to incorporate gaps as well as daily movements.
ATR is an absolute value and not a percentage. A 100 dollar stock will have ATR values double those of a 50 dollar stock assuming both are equally volatile.
First calculate the 'True Range' for each bar in the period. This is determined as the greatest of these 3 values (as absolutes):
Yesterday Close to Today High;
Yesterday Close to Today Low;
Today High to Today Low.
The first ATR value is just the Simple Moving Average of the 'True Range'. Subsequent values are smoothed by incorporating previous values as follows:
ATR = (Prior ATR * (Period - 1) + TR) / Period
Sufficient Data for Accuracy
ATR is one of several indicators that include an element of prior data. As such a 14 day ATR based on 50 days of underlying data will be significantly different to a 14 day ATR based on 500 days of data. This site will always include enough data to ensure 'accuracy'.