-
Notifications
You must be signed in to change notification settings - Fork 658
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
Feature Request: Moving Average on Volume panel #216
Comments
EDIT: mpf.plot(stck.iloc[170:], type='candlestick', volume=True,title = ticker, tight_layout=True, hlines=ml_results, mav=(9,26), style = s, returnfig=True,addplot = apc) Volume Set to True, and volume as line with line type: ' ' space works for now. |
What you have done here is the simplest way to do this with the present version of mplfinance. Would you be interested in contributing an enhancement for Thanks. --Daniel |
If you can guide me through the steps. Happy to help you :) |
In this comment, I will guide you though the code, to make the So I will focus here on the relevant parts of the code, and suggest an approach to make the changes needed to support
If you need help with any of the above procedures, no worries, just let me know and I will walk you through it. All of the changes you will make are in file The function The This made sense when there were only two sources for "mav" settings, but now we want to add a third (
becomes
This way, there will be no need for the " Now might be a good time to read through Once the above change is done, you have changed code but effectively you have not changed any functionality, so everything should continue to run and work as it did previously with no errors (you may want to test it). Next you will want to call Before doing that you will have to add the The You will want to pretty much copy/paste the couple of lines for the That's it in a nutshell. Then test and make sure its working. And of course, feel free to post any questions here, or email me at [email protected] All the best. --Daniel |
How to add moving average on Volume Panel (panel = 1) if volume is set to True.
I have plotted mav(9,26) in Panel 0 using 'mav' function
If I edit and enter Volume = False and add Volume in Panel 1 using addplot funtion. Color of the volume candles becomes solid blue irrespective of the color of the candle in Panel '0'
EDIT:
here is a part of the code
The text was updated successfully, but these errors were encountered: