I\'ve been trying to calculate the Exponential Moving Average (EMA) for stock prices. I have the following methods:
def ema