MA function

Simple Moving Average