I found a same topic with a solution here
Custom color of Plotly candlesticks
However, using that solution my output graph is separated into "three zones" based on timestamp. For example, I got a graph begins with the first range include candlesticks from 9am-14:29pm, all candlesticks have same red; and the second range include candlesticks from 9am-14:29pm, all candlesticks have same green; and so on.
However I need candlesticks all mix color in one range of time from 9am-14:29pm.
data = pd.DataFrame(master.intradata)
intradata_sell = data[data['oi'] == 1]
intradata_buy = data[data['oi'] == 2]
intradata_und = data[data['oi'] == 3]
fig = go.Figure(go.Candlestick(x=intradata_sell['time'],
open=intradata_sell['open'], high=intradata_sell['high'],
low=intradata_sell['low'], close=intradata_sell['close']))
fig.add_traces(go.Candlestick(x=intradata_buy['time'],
open=intradata_buy['open'], high=intradata_buy['high'],
low=intradata_buy['low'], close=intradata_buy['close']))
fig.add_traces(go.Candlestick(x=intradata_und['time'],
open=intradata_und['open'], high=intradata_und['high'],
low=intradata_und['low'], close=intradata_und['close']))
fig.data[0].increasing.fillcolor = 'red'
fig.data[0].increasing.line.color = 'red'
fig.data[0].decreasing.fillcolor = 'red'
fig.data[0].decreasing.line.color = 'red'
fig.data[1].increasing.fillcolor = 'green'
fig.data[1].increasing.line.color = 'green'
fig.data[1].decreasing.fillcolor = 'green'
fig.data[1].decreasing.line.color = 'green'
fig.data[2].increasing.fillcolor = 'orange'
fig.data[2].increasing.line.color = 'orange'
fig.data[2].decreasing.fillcolor = 'orange'
fig.data[2].decreasing.line.color = 'orange'
fig.show()