SIDEBAR: How moving averages are computed
Moving average are usually specified by two parameters. The first is the length of the moving average and is generally expressed in the same periodicity as the data. For example, if we have the daily price of the data, we might speak of a 10-day moving average. The second parameter is which data point's moving average we want to compute. For example, you might request the 30-day moving average for July 6.
Three moving average algorithms are in wide use: simple, linear and exponential. Each performs roughly the same goal of averaging several days (weeks, months and so forth) of data to eliminate minor
fluctuations, and to extract the essence of the underlying trend. Each tries to perform this task in a slightly different way.