add trade_direction to trade object
This commit is contained in:
parent
a2b17882e6
commit
6562511137
@ -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])
|
||||
|
Loading…
Reference in New Issue
Block a user