mplfinance icon indicating copy to clipboard operation
mplfinance copied to clipboard

Feature Request: Can we please have 'ema' plotting similarly to mav

Open swargamr opened this issue 3 years ago • 1 comments

Is your feature request related to a problem? Please describe. I would like to plot the Exponential Moving Average in mplfinance we have Simple moving average, but ema would also help for number of stratergies.

Describe the solution you'd like A clear and concise description of what you want to happen.

Describe alternatives you've considered

Additional context Add any other context or screenshots about the feature request here.

swargamr avatar Mar 03 '22 11:03 swargamr

Since you are dealing with DataFrames we can use something like data['Close'].ewm(span=50.0,adjust=False).mean() to get a 50 EMA. In order to plot it you can use mpf.make_addplot()

alexandrepal avatar Mar 03 '22 15:03 alexandrepal