-
Notifications
You must be signed in to change notification settings - Fork 643
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
mpf.plot - extending line joining two points #278
Comments
Does anyone know how to extend the blue bold line? Please teach me. I have done quite some research in the documents but I could not figure out a way. |
Try |
Alternatively you can also use the |
I tried to set tight_layout=True in the mpf.plot() but the blue bold line is still just connecting the 2 points. Did I wrongly do? |
I apologize. I misinterpreted your original question. I mistakenly thought you were looking to get rid of the space on the left and right between the data and the vertical (y) axis. Would it be correct to say that you want the plot to look like this? |
Oh yes!!! This is exactly what I wanted to plot! May I know how? |
There is no feature of mplfinance that will automatically extrapolate I assume that What you want to do is extrapolate that line to find the price at the far right, let's call it One way to do it would be to find the slope: If you want to continue to allow If Let me know if this is enough information to help. (If not, then I can be more specific about coding the extrapolation, and setting |
Also, fyi, once you have |
This is very informative! Thank you very much for the advice! I will try out this method later. |
I have not thought of using slope to extrapolate. |
@sukioral , |
@sukioral -- were you able to get this to work?? |
I am using the follow code to join the lower points of two bars together (the blue bold line):
mpf.plot(data,hlines=dict(hlines=hlines_carrier,colors=['g','r'],linestyle='-.'),type='candle',alines=two_points)
However, I would like to the line to extend onto the right and touch the y-axis. What codes I should change in order to do that?
Thank you.
The text was updated successfully, but these errors were encountered: