feat: require gate reset before post-stop reentry
This commit is contained in:
@@ -36,3 +36,13 @@ class PaperTrade(Base):
|
||||
closed_at: Mapped[datetime | None] = mapped_column(DateTime(timezone=True), nullable=True)
|
||||
# How the trade was closed: "time" | "trailing" | "stop" | "target" | "manual".
|
||||
close_reason: Mapped[str | None] = mapped_column(String(10), nullable=True)
|
||||
# A trade stopped at its initial stop starts a re-entry gate-reset episode.
|
||||
# The daily full-universe scanner records both state transitions: the first
|
||||
# failed gate observation and a later fresh qualification. Re-entry remains
|
||||
# non-actionable until both timestamps exist.
|
||||
reentry_gate_failed_at: Mapped[datetime | None] = mapped_column(
|
||||
DateTime(timezone=True), nullable=True
|
||||
)
|
||||
reentry_gate_requalified_at: Mapped[datetime | None] = mapped_column(
|
||||
DateTime(timezone=True), nullable=True
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user