add trade_direction to trade object

This commit is contained in:
Matthias 2022-02-22 07:17:12 +01:00
parent a2b17882e6
commit 6562511137
1 changed files with 7 additions and 0 deletions

View File

@ -385,6 +385,13 @@ class LocalTrade():
else:
return "sell"
@property
def trade_direction(self) -> str:
if self.is_short:
return "short"
else:
return "long"
def __init__(self, **kwargs):
for key in kwargs:
setattr(self, key, kwargs[key])