Creting moving average time based.