Preparing to calculate moving average.