From 54ef52692f1676bda8bba42b5433f757fdce00dc Mon Sep 17 00:00:00 2001 From: Sam Germain Date: Sat, 20 Nov 2021 01:06:10 -0600 Subject: [PATCH] Trade.has_no_leverage makes more sense --- freqtrade/persistence/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/freqtrade/persistence/models.py b/freqtrade/persistence/models.py index cb38bc01d..f9df45111 100644 --- a/freqtrade/persistence/models.py +++ b/freqtrade/persistence/models.py @@ -283,7 +283,7 @@ class LocalTrade(): @property def has_no_leverage(self) -> bool: """Returns true if this is a non-leverage, non-short trade""" - return ((self.leverage or self.leverage is None) == 1.0 and not self.is_short) + return ((self.leverage == 1.0 or self.leverage is None) and not self.is_short) @property def borrowed(self) -> float: