Updating moving average length