Exponential moving average (EMA), or exponentially weighted moving average (EWMA), applies a damping factor, alpha, that exponentially decreases the weights of older values. This technique gives much more weight to recent observations, while retaining older observations.
The EMAVG function computes the arithmetic average of the first n rows and then, for each subsequent row, computes the new value with this formula:
new_emavg = alpha * new_value + (1-alpha) * old_emavg
The initial value of old_emavg is the arithmetic average of the first n rows. The values n and alpha are specified by the function arguments Start_Rows and Alpha, respectively.