how to calculate the atr
the first step in calculating atr is to find a series of true range values for a security the price range of an asset for a given trading day is its high minus its low to find an asset s true range value you first determine the three terms from the formula suppose that xyz s stock had a trading high today of 21 95 and a low of 20 22 it closed yesterday at 21 51 using the three terms we use the highest result h l 21 95 20 22 1 73 text h text l 21 95 20 22 1 73 h l 21 95 20 22 1 73 h c p 21 95 21 51 0 44 text h text c p 21 95 21 51 0 44 h cp 21 95 21 51 0 44 l c p 20 22 21 51 1 29 text l text c p 20 22 21 51 1 29 l cp 20 22 21 51 1 29the number you d use would be 1 73 because it is the highest value because you don t have a previous atr you need to use the atr formula 1 n i n tr i begin aligned big frac 1 n big sum i n text tr i end aligned n1 i n tri using 14 days as the number of periods you d calculate the tr for each of the 14 days assume the following prices from the table you d use these prices to calculate the tr for each day you find that the highest values for each day are from the h l column so you d add up all of the results from the h l column and multiply the result by 1 n per the formula 1 73 1 15 1 16 1 12 1 15 1 16 1 09 1 17 1 14 1 15 1 16 1 14 1 16 1 17 16 65 begin aligned 1 73 1 15 1 16 1 12 1 15 1 16 1 09 1 17 1 14 1 15 1 16 1 14 1 16 1 17 16 65 end aligned 1 73 1 15 1 16 1 12 1 15 1 16 1 09 1 17 1 14 1 15 1 16 1 14 1 16 1 17 16 65 1 n 16 65 1 14 16 65 begin aligned frac 1 n 16 65 frac 1 14 16 65 end aligned n1 16 65 141 16 65 0 714 16 65 1 18 begin aligned 0 714 times 16 65 1 18 end aligned 0 714 16 65 1 18 so the average volatility for this asset is 1 18 now that you have the atr for the previous period you can use it to determine the atr for the current period using the following previous atr n 1 tr n begin aligned frac text previous atr n 1 text tr n end aligned nprevious atr n 1 tr this formula is much simpler because you only need to calculate the tr for one day assuming on day 15 the asset has a high of 25 55 a low of 24 37 and closed the previous day at 24 87 its tr works out to 1 18 1 18 14 1 1 18 14 begin aligned frac 1 18 14 1 1 18 14 end aligned 14 1 18 14 1 1 18 1 18 13 1 18 14 begin aligned frac 1 18 13 1 18 14 end aligned 14 1 18 13 1 18 15 34 1 18 14 begin aligned frac 15 34 1 18 14 end aligned 14 15 34 1 18 16 52 14 1 18 begin aligned frac 16 52 14 1 18 end aligned 14 16 52 1 18 the stock closed the day again with an average volatility atr of 1 18 image by sabrina jiang investopedia 2020