From f41c659cb2a2e97e572b1e4703b11c1e2d9258cb Mon Sep 17 00:00:00 2001 From: Matthias Date: Sat, 19 Oct 2019 13:18:52 +0200 Subject: [PATCH] Plotting trades from database should show correct duration --- freqtrade/data/btanalysis.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/freqtrade/data/btanalysis.py b/freqtrade/data/btanalysis.py index b03bdb74d..17abae3b6 100644 --- a/freqtrade/data/btanalysis.py +++ b/freqtrade/data/btanalysis.py @@ -93,7 +93,7 @@ def load_trades_from_db(db_url: str) -> pd.DataFrame: t.close_date.replace(tzinfo=pytz.UTC) if t.close_date else None, t.calc_profit(), t.calc_profit_percent(), t.open_rate, t.close_rate, t.amount, - (t.close_date.timestamp() - t.open_date.timestamp() + (round((t.close_date.timestamp() - t.open_date.timestamp()) / 60, 2) if t.close_date else None), t.sell_reason, t.fee_open, t.fee_close,