Why do the colours on bar charts and volume bars not match sometimes?

Sometimes a green candle sits above a red volume bar, or the other way around. That's expected — the candle and its volume bar are coloured using two different comparisons.

The candle's colour: close vs open

A candle is coloured by comparing its own open and close:

  • Green when the close is higher than the open.
  • Red when the close is lower than the open.

The volume bar's colour: close vs the previous close

A volume bar is coloured by comparing the candle's close with the previous candle's close:

  • Green when this candle's close is higher than the previous candle's close.
  • Red when this candle's close is lower than the previous candle's close.

Why they can differ

Because they measure different things, a candle can be green (it closed above its own open) while its volume bar is red (it still closed below the previous candle's close) — or the other way around. It's not an error; the two colours are simply answering different questions.