From 45fb4d25abf06484c8a0020102fd9786826eaa8b Mon Sep 17 00:00:00 2001 From: orehunt Date: Tue, 31 Mar 2020 18:47:53 +0200 Subject: [PATCH] use equality instead of index for row lookups --- freqtrade/plot/plotting.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/freqtrade/plot/plotting.py b/freqtrade/plot/plotting.py index fc8f25612..b311c591a 100644 --- a/freqtrade/plot/plotting.py +++ b/freqtrade/plot/plotting.py @@ -132,8 +132,8 @@ def add_max_drawdown(fig, row, trades: pd.DataFrame, df_comb: pd.DataFrame) -> m drawdown = go.Scatter( x=[highdate, lowdate], y=[ - df_comb.loc[highdate, 'cum_profit'], - df_comb.loc[lowdate, 'cum_profit'], + df_comb.loc[df_comb.index == highdate, 'cum_profit'], + df_comb.loc[df_comb.index == lowdate, 'cum_profit'], ], mode='markers', name=f"Max drawdown {max_drawdown:.2f}%",