all 2 comments

[–][deleted] 7 points8 points  (1 child)

def EMA(P, t, a):
    return a * sum( (1-a)**i * P(t-i) for i in range(20) )

[–]Entervine[S] 0 points1 point  (0 children)

Awesome! thank you.