reusing movingAverage() in other charts