Improve typesafety around trade object

This commit is contained in:
Matthias
2023-02-20 18:26:32 +01:00
parent 8765e3a4d6
commit c2c039151c
2 changed files with 8 additions and 3 deletions

View File

@@ -410,7 +410,7 @@ class RPC:
exit_reasons[trade.exit_reason][trade_win_loss(trade)] += 1
# Duration
dur: Dict[str, List[int]] = {'wins': [], 'draws': [], 'losses': []}
dur: Dict[str, List[float]] = {'wins': [], 'draws': [], 'losses': []}
for trade in trades:
if trade.close_date is not None and trade.open_date is not None:
trade_dur = (trade.close_date - trade.open_date).total_seconds()