Skip to content

Highlighting candlestick patterns. #254

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

Open
simonholzapfel opened this issue Sep 2, 2020 · 5 comments
Open

Highlighting candlestick patterns. #254

simonholzapfel opened this issue Sep 2, 2020 · 5 comments
Labels
question Further information is requested

Comments

@simonholzapfel
Copy link

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.

@simonholzapfel simonholzapfel added the question Further information is requested label Sep 2, 2020
@fxhuhn
Copy link
Contributor

fxhuhn commented Sep 2, 2020

i use two horizontal lines for 4 candle narrow ranges and triangles for EMA/SMA breakouts.
Do you mean something like this?

fb_us

@simonholzapfel
Copy link
Author

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?

@DanielGoldfarb
Copy link
Collaborator

DanielGoldfarb commented Sep 2, 2020

@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:

  1. As Markus noted above: Highlighting candlestick patterns. #254 (comment)

  2. Add a number or a symbol above/below a candle chart with mplfinance? #97 (comment)

  3. https://user-images.githubusercontent.com/49436733/79945165-84a61500-846d-11ea-8d7c-ec3ac876bdd5.png

  4. https://user-images.githubusercontent.com/11164790/82761057-b04a5100-9dc5-11ea-93e2-dfba0ef00095.png

  5. https://user-images.githubusercontent.com/11164790/76273899-70a7aa80-6255-11ea-8636-f2cff10b3ba8.jpg

  6. fill_between example (from the plot cutomizations tutorial):
    image

  7. Example from the addplot tutorial

image

  1. Some examples from the lines tutorial:

image
image
image

@fxhuhn
Copy link
Contributor

fxhuhn commented Sep 2, 2020

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.

ice_amd_us

@simonholzapfel
Copy link
Author

simonholzapfel commented Sep 3, 2020

i use two horizontal lines for 4 candle narrow ranges and triangles for EMA/SMA breakouts.
Do you mean something like this?

fb_us

@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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants