Black Lives Matter. Please consider donating to Black Girls Code today.
Learn how to use COVID-19 data in open source Dash apps. Register for the Sept 23rd webinar with IQT!

How can I set the multiple colors in the OHLC chart?


I created an OHLC chart with three Bar charts. Here the three bar chart color comes from the three different formulas of stock indicators. Now I want to set the multiple colors in the OHCL chart from that three bar chart’s colors.

For example, In the below picture I drew a BLUE line as soon as all of these conditions are true, then the line color display as Green in the OHCL chart.

And if all of these conditions are false, then In the OHCL chart the line color display as Red.

And if above both condition are false then color display as black.

I was trying to set multiple colors as an array in Bar chart and it’s working properly. but I want to set that multiple color functionality in OHLC. Please, help me. How can I set the above colors functionality in my OHLC chart?


We don’t support that at the moment. I’d recommend splitting your ohlc data into two trace traces.

Hello, Etienne
First of all thanx for replying.
I can understand what you said. but I want the multiple colors functionality in only the one OHLC chart.
I know the markers DOM elements were used for colors array in bar-chart. And if we will set markers DOM elements for the OHLC chart then we can use the multiple colors functionality same working in bar-chart.

So, Can you please help me to set this functionality in OHLC chart?

Thank you…