(feat) add visualizations for backtesting

This commit is contained in:
cardosofede
2024-05-16 18:21:37 -04:00
parent 810642df37
commit 4ba64bfbd4
4 changed files with 83 additions and 0 deletions

View 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')