from enum import Enum class EventKind(Enum): NEW_MINIMUM = 1, NEW_MAXIMUM = 2, REACHED_LOSS = 3, REACHED_BREAK_EVEN = 4, REACHED_MIN_PROFIT = 5, REACHED_GOOD_PROFIT = 6, REACHED_MAX_LOSS = 7, CLOSE_POSITION = 8, TRAILING_STOP_SET = 9, TRAILING_STOP_MOVED = 10, ORDER_SUBMITTED = 11, class Event: def __init__(self, kind: EventKind, tick: int) -> None: self.kind: EventKind = kind self.tick: int = tick def __repr__(self) -> str: return f"{self.kind.name} @ Tick {self.tick}"