feat: require gate reset before post-stop reentry
This commit is contained in:
1 parent
1a6f82bf6d
commit
5155d00d9e
18 files changed
+577
-278
No files matched your search
@@ -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