mirror of
https://github.com/aljazceru/hummingbot-dashboard.git
synced 2025-12-24 00:34:23 +01:00
(feat) add visualizations for backtesting
This commit is contained in:
12
frontend/visualization/candles.py
Normal file
12
frontend/visualization/candles.py
Normal file
@@ -0,0 +1,12 @@
|
||||
import plotly.graph_objects as go
|
||||
import pandas as pd
|
||||
|
||||
def get_candlestick_trace(df):
|
||||
df.index = pd.to_datetime(df.timestamp, unit='ms')
|
||||
return go.Candlestick(x=df.index,
|
||||
open=df['open'],
|
||||
high=df['high'],
|
||||
low=df['low'],
|
||||
close=df['close'],
|
||||
name="Candlesticks",
|
||||
increasing_line_color='#2ECC71', decreasing_line_color='#E74C3C')
|
||||
Reference in New Issue
Block a user