-
Notifications
You must be signed in to change notification settings - Fork 660
Bar colors based on indicator value #205
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
Comments
When you say "ohlc bar" colors, I assume you mean ohlc bars like this: https://raw.githubusercontent.com/matplotlib/mplfinance/master/readme_files/readme_4_1.png Presently there is no way to color them other than upcolor/downcolor, however possibly, as an relatively easy enhancement, we could allow the caller to pass in a list of colors, where the list is the same length as the data, and each ohlc bar would be colored according the color at that corresponding point in the list. It would then be up to the caller to pass in the appropriate color for each ohlc data point (whether the total number of different colors is two, or three, or more). |
Yes those bars, although it would be nice for candlesticks also. That sounds like a workable solution. Thanks, Daniel. |
Hi Daniel I have a use case which would be solved by your proposed enhancement as well. Best regards |
@geirak |
Here's what I am thinking:
I am also considering the following, if there is need for it:
|
Your first proposal would solve my requirement to color the candles according to custom logic (showing momentum/lack of momentum according to a given rule set). Optionally using a dict instead of an array/list for If the |
Should this issue be marked as closed since marketcolor_overrides kwargs seem to deliver this feature? |
@siddiqaa |
Is there a way to color bars based on TA indicator values (obtained using TA-lib or similar) or based on aggregate values of multiple indicators, e.g. 3 different ohlc bar colors representing “long”, “short” and “no trade”? Thank you for any insight.
The text was updated successfully, but these errors were encountered: