Fix output format to be of an identical type

This commit is contained in:
Matthias 2020-07-26 15:17:54 +02:00
parent 902e8fa62f
commit 9ed5fed887

View File

@ -208,9 +208,9 @@ def generate_daily_stats(results: DataFrame) -> Dict[str, Any]:
'draw_days': draw_days,
'losing_days': losing_days,
'winner_holding_avg': (timedelta(minutes=round(winning_trades['trade_duration'].mean()))
if not winning_trades.empty else '0:00'),
if not winning_trades.empty else timedelta()),
'loser_holding_avg': (timedelta(minutes=round(losing_trades['trade_duration'].mean()))
if not losing_trades.empty else '0:00'),
if not losing_trades.empty else timedelta()),
}