ema ( seq n -- newseq )


Vocabulary
math.finance

Inputs
seqa sequence
nnumber of periods


Outputs
newseqa sequence


Word description
Returns the Exponential Moving Average with the specified periodicity, calculated by:
A = 2.0 / (N + 1)
EMA[t] = (A * SEQ[t]) + ((1-A) * EMA[t-1])


Definition