add moving average support