matplotlib / mplfinance

Financial Markets Data Visualization using Matplotlib
https://pypi.org/project/mplfinance/
Other
3.48k stars 613 forks source link

Hollow and Filled Candles #663

Closed vinaychuri closed 3 months ago

vinaychuri commented 3 months ago

I am trying to follow the doc @ https://github.com/matplotlib/mplfinance/blob/master/examples/hollow_and_filled_candles.ipynb The data used is as follows: date open high low close 2021-01-01 2880 2940 2879 2928.25 2021-01-04 2950 3050.75 2940.95 3039.45 2021-01-05 3039.6 3114.25 3039.6 3093 2021-01-06 3100 3113.5 3037.2 3051.5 2021-01-07 3075 3080.85 3000.25 3032.8

The example displays correctly for the Close>Open situation with the hollow and filled colors. mpl.plot(df,type="hollow_and_filled",style='nightclouds')

But the 2,3rd candle should have different line color for the edges since their close is > previous close image

Is there a style/setup change i need to add to the code?

DanielGoldfarb commented 3 months ago

@vinaychuri

As you can see from "nightclouds" style definition file

The colors on the above chart are correct.