Open simonholzapfel opened 3 years ago
i use two horizontal lines for 4 candle narrow ranges and triangles for EMA/SMA breakouts.
Do you mean something like this?
Well this could be a good alternative, but I had something like coloring the highlighted candlesticks with brighter colors in mind. Is that even possible?
@simonholzapfel
There is no "best way" to highlight a pattern. It's really just a matter of preference how you want to do it.
In terms of actually modifying the candle colors for some of the candles, mplfinance does not yet support this, but there is a suggestion here for an enhancement that would support doing so. The enhancement suggestion mentions ohlc bars, but it can also be made to work for candles.
A good workaround, for now, would be to use fill_between
, or to overlay a marker symbol from a scatter plot, as shown in some of the examples below, but to put the marker directly on top of the candle(s) of interest.
Here are some examples of what some people have done:
As Markus noted above: https://github.com/matplotlib/mplfinance/issues/254#issuecomment-685729260
https://github.com/matplotlib/mplfinance/issues/97#issue-601609003
https://user-images.githubusercontent.com/49436733/79945165-84a61500-846d-11ea-8d7c-ec3ac876bdd5.png
https://user-images.githubusercontent.com/11164790/82761057-b04a5100-9dc5-11ea-93e2-dfba0ef00095.png
https://user-images.githubusercontent.com/11164790/76273899-70a7aa80-6255-11ea-8636-f2cff10b3ba8.jpg
fill_between
example (from the plot cutomizations tutorial):
Example from the addplot tutorial
Some examples from the [lines tutorial](https://github.com/matplotlib/mplfinance/blob/master/examples/using_lines.ipynb):
have not found any good suggestions for this. Parallel to this I am still working with colored dots below/on top, which can be noticed immediately.
i use two horizontal lines for 4 candle narrow ranges and triangles for EMA/SMA breakouts. Do you mean something like this?
@fxhuhn I will use this as an alternative until the requested feature gets implemented, thank you for bringing up this solution! Could you please provide me a code example, so I can figure out how this works?
What is the best way to highlicht a pattern in a candlestick chart for example by changing their color. Any help is appreciated as I am new here and using this library for the first time.