I think the formula is *EMA<sub>i</sub>(λ) = x<sub>i</sub> ✕ (1-λ) + EMA<sub>i-1</sub> ✕ λ* Not *x<sub>i-1* in the first term. Thanks,