Harden trading, training, and monitoring
This commit is contained in:
@@ -88,6 +88,9 @@ class Position:
|
||||
entry_confidence: float = 0.0
|
||||
entry_pattern: str = ""
|
||||
entry_diagnostics: dict[str, Any] = field(default_factory=dict)
|
||||
protective_order_id: str = ""
|
||||
protective_order_link_id: str = ""
|
||||
mode: str = "paper"
|
||||
|
||||
def mark_price(self, price: float) -> float:
|
||||
return self.qty * price
|
||||
@@ -131,6 +134,7 @@ class Trade:
|
||||
entry_diagnostics: dict[str, Any] = field(default_factory=dict)
|
||||
opened_at: datetime | None = None
|
||||
closed_at: datetime | None = None
|
||||
mode: str = "paper"
|
||||
|
||||
def as_dict(self) -> dict[str, Any]:
|
||||
data = asdict(self)
|
||||
|
||||
Reference in New Issue
Block a user