added str and repr for positionstate. returning pw on strategy apply
This commit is contained in:
parent
2130f8acb9
commit
55bfe8824b
@ -53,6 +53,11 @@ class PositionState(Enum):
|
||||
else:
|
||||
return "green"
|
||||
|
||||
def __str__(self):
|
||||
return f"{self.name}"
|
||||
|
||||
def __repr__(self):
|
||||
return self.__str__()
|
||||
|
||||
class Ticker:
|
||||
def __init__(self, sec) -> None:
|
||||
@ -171,6 +176,8 @@ class SymbolStatus:
|
||||
raise ValueError
|
||||
await self.__add_event__(e)
|
||||
|
||||
return pw
|
||||
|
||||
async def __trigger_position_state_callbacks__(self, pw: PositionWrapper):
|
||||
await self.eh.call_position_state(self, pw)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user