i_mav function

Moving Average