matplotlib/mplfinance

Hollow and Filled Candles

vinaychuri opened this issue · 1 comments

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?

@vinaychuri

As you can see from "nightclouds" style definition file

  • UP (from previous close) is WHITE and
  • DOWN (from previous close) is BLUE.

The colors on the above chart are correct.