Trade.has_no_leverage makes more sense

This commit is contained in:
Sam Germain 2021-11-20 01:06:10 -06:00
parent f40221dd9f
commit 54ef52692f

View File

@ -283,7 +283,7 @@ class LocalTrade():
@property @property
def has_no_leverage(self) -> bool: def has_no_leverage(self) -> bool:
"""Returns true if this is a non-leverage, non-short trade""" """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 @property
def borrowed(self) -> float: def borrowed(self) -> float: