mirror of
https://github.com/aljazceru/hummingbot-dashboard.git
synced 2025-12-23 00:04:25 +01:00
(feat) clean up visualization
This commit is contained in:
@@ -5,7 +5,6 @@ from frontend.visualization import theme
|
|||||||
|
|
||||||
|
|
||||||
def get_candlestick_trace(df):
|
def get_candlestick_trace(df):
|
||||||
df.index = pd.to_datetime(df.timestamp, unit='ms')
|
|
||||||
return go.Candlestick(x=df.index,
|
return go.Candlestick(x=df.index,
|
||||||
open=df['open'],
|
open=df['open'],
|
||||||
high=df['high'],
|
high=df['high'],
|
||||||
|
|||||||
@@ -40,4 +40,4 @@ def get_macd_traces(df, macd_fast, macd_slow, macd_signal):
|
|||||||
go.Bar(x=df.index, y=df[macd_hist], name='MACD Histogram',
|
go.Bar(x=df.index, y=df[macd_hist], name='MACD Histogram',
|
||||||
marker_color=df[f"MACDh_{macd_fast}_{macd_slow}_{macd_signal}"].apply(lambda x: '#FF6347' if x < 0 else '#32CD32'))
|
marker_color=df[f"MACDh_{macd_fast}_{macd_slow}_{macd_signal}"].apply(lambda x: '#FF6347' if x < 0 else '#32CD32'))
|
||||||
]
|
]
|
||||||
return traces
|
return traces
|
||||||
|
|||||||
Reference in New Issue
Block a user