Class for calculating EMA