How to plot both OHLC and Volume


This question has been asked many times but almost never answered. I’d like to show both a candlestick chart and the volume below. Of course, both charts must share the same x-axis (but not the same y-axis!) so that scrolling the candlestick chart also scrolls the volume chart.

I tried add_trace or a list of figures to plot() to no avail.

Thanks in advance,

Hello @Mark531, welcome to the forum! Could you use subplots with a shared x-axis as in

1 Like

Awesome! The option that did the ting was shared_xaxes=True.

Thank you!

not quite.
there is a detail in the volume chart.
it is coloured according to the daily change. if it’s positive, then it is green. otherwise, red.
it can be set manually, but that is a huge work that an api could have already taken it into account.
any hints? thank you.