Added moving average mode