Update MovingAverage.py

Fixed Index problems