-
Notifications
You must be signed in to change notification settings - Fork 634
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
Chart does not look harmonious with new candles #174
Comments
If the candles were as wide as the volume boxes, they would be touching each other. My impression is that most people prefer the candles not to touch; but if enough people would prefer wider candles, we can modify the default "width adjustment" algorithm to provide generally wider candles. For my own taste, I think I'd prefer the candles a little bit wider. Perhaps I will tweak the algorithm as such. Meanwhile take a look at this notebook to see how you can tweak the candle part of the algorithm to be a little wider. For example you can set kwarg
Let me know how that works out for you. |
If you don't mind, I'd like to ask you to make a small change to to the code on your local machine and let me know you opinion of how it makes the candles look. Please find this line of code in
which is here: And change it to use 65% of the volume width:
If you have some time, please do that and let me know what you think. |
Regarding candle wicks being slightly off-center, especially when there is a lot of data, that is a problem that pretty much all graphics packages will have, and depends very much on how much data is presented, screen resolution, and plot size. That said, with considerable work, I'm sure we could make it, on average, better. See these two comments which mention the issue:
Please feel free to investigate and propose a solution. |
Sure, candles should not touch but they would have to be a little wider by default. I have never seen such thin widths in other financial packages. I understand we can already control that linking candle_width to volume_width ourselves, good I will try! |
I will change the default to be somewhat wider ... probably approximately along the lines of what @fxhuhn found by modifying the code to be Let us know if you agree with that setting as a default. Thanks for the input. Much appreciated. @manuelwithbmw , @fxhuhn - Please note: the above mentioned line-of-code change will make the default candle with wider for use-cases with a lot of data, but will actually make the default candle width smaller than it is now, for cases of much less data (for example only 20 to 50 data points). Please check with that code change, if you don't mind, and let me know your opinions for cases of less data. If, in your opinions, those (less data) cases are too narrow with the new default, I will come up with an adjustment to the default width that modifies only the default for cases with a lot of data. I hope to make and release this change to the default width this week. |
Not sure how to use a 'fork' procedure, trying it now for the first time. |
@DanielGoldfarb FYI personally I find these candles too close to each other. I am trying to test 0.65 and 0.48 with my code but not sure how to 'fork' the code. Chart with scale_width_adjustment=dict(candle=1.25) added above looked better |
Manuel,
This gives me enough information; I can extrapolate from there, so you don't have to do That said, since it's good to know how to install a local fork/clone: Once you have a
The above pip will install the locally cloned package. The After you are done working with the locally cloned package, you simply If you ever loose track of which one is installed you can run the following command:
That will print out the location of mplfinance's (Some people do the above local install in a virtual environment to keep it isolated from the rest of the machine. I personally don't bother with virtual environments when working on my own machine: only when I'm working on a shared server with other people, or if I am trying to reproduce a problem that someone else is having and I want to reproduce their whole environment). All the best. --Daniel |
The fact that at certain resolutions, and/or for relatively larger amounts of data, the candle wicks are sometimes not centered on every candle, is a more complex problem to solve, and will not be addressed at this time. |
When I look at the new narrow candles, they look kind of disharmonious. The candles have become very narrow compared to the volume boxes.
The wicks and fuses don't seem to be centered. Would it be possible to additionally frame the candle body?
What do you think?
The text was updated successfully, but these errors were encountered: