Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there any way to set the size of moving averages? #171

Closed
Sile25 opened this issue Jun 13, 2020 · 4 comments
Closed

Is there any way to set the size of moving averages? #171

Sile25 opened this issue Jun 13, 2020 · 4 comments
Labels
enhancement New feature or request question Further information is requested released code merged into repo AND released to Pypi

Comments

@Sile25
Copy link

Sile25 commented Jun 13, 2020

Hello! I added MAs to my chart, but the problem is that in some parts of the charts they override the candles, since the moving average is too wide. Is there any way to set them smaller? I know i can set the color using mavcolors=[], but mavwidths=[] doesn't work

@Sile25 Sile25 added the question Further information is requested label Jun 13, 2020
@DanielGoldfarb
Copy link
Collaborator

I'm glad you brought this to my attention. Version 0.12.5 introduced a new algorithm to calculate widths of candles, ohlc ticks, and volume bars, based on the density and other factors that affect which widths "look good."

I now realize that I should have included mav ilnes, and type='line' lines in that calculation. That will be done with the next release. I will post here when it is relased and we will see if the moving averge is then not too wide. There will also be a way to adjust the width if the algorithm doesn't get it quite the way you want.

@DanielGoldfarb DanielGoldfarb added enhancement New feature or request in progress labels Jun 16, 2020
@DanielGoldfarb
Copy link
Collaborator

mplfinance 0.12.5a3 is now released on Pypi (pip install --upgrade mplfinance) and addresses this issue. I expect that you will find the automatic adjustment of mav line widths to be adequate, but if not, please post here and I will direct you as to how to adjust them further. Thank you.

@DanielGoldfarb DanielGoldfarb added released code merged into repo AND released to Pypi and removed in progress labels Jun 16, 2020
@Sile25
Copy link
Author

Sile25 commented Jun 17, 2020

Thank you @DanielGoldfarb , this is exactly what i wanted! The new candle widths algorithm looks faboulous though!

@DanielGoldfarb
Copy link
Collaborator

@Sile25 - thanks for the feedback. much appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested released code merged into repo AND released to Pypi
Projects
None yet
Development

No branches or pull requests

2 participants