From 6613e3757aabea128e54cdfffbd7511df883ba4f Mon Sep 17 00:00:00 2001 From: Reigo Reinmets Date: Sun, 23 Jan 2022 18:09:57 +0200 Subject: [PATCH] Additional fix --- freqtrade/persistence/models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/freqtrade/persistence/models.py b/freqtrade/persistence/models.py index c3aabd928..76886d8ae 100644 --- a/freqtrade/persistence/models.py +++ b/freqtrade/persistence/models.py @@ -584,10 +584,10 @@ class LocalTrade(): continue tmp_amount = o.amount - tmp_price = o.average or o.price or 0.0 + tmp_price = o.average or o.price if o.filled is not None: tmp_amount = o.filled - if tmp_amount > 0.0 and tmp_price is not None and o.status == 'closed': + if tmp_amount > 0.0 and tmp_price is not None: total_amount += tmp_amount total_stake += tmp_price * tmp_amount