feat: near-close scan schedule and distinct-day gate reset
Move the only qualifying R:R scan to 15:30 ET with chained Telegram alerts, put outcome eval after a final-bar OHLCV fetch, enforce NY trading-day requalify semantics, stamp paper trades fill_mode=near_close, and migrate stored schedule_* keys to America/New_York.
This commit is contained in:
@@ -333,6 +333,9 @@ async def create_trade(
|
||||
target=target,
|
||||
status="open",
|
||||
opened_at=datetime.now(timezone.utc),
|
||||
# Near-close cutover era — Track Record must not mix with morning-scan
|
||||
# fills or future broker-routed fills when comparing to backtests.
|
||||
fill_mode="near_close",
|
||||
)
|
||||
db.add(trade)
|
||||
await db.commit()
|
||||
@@ -386,6 +389,7 @@ def _to_dict(
|
||||
"alpha_pct": alpha_pct,
|
||||
"alpha_usd": alpha_usd,
|
||||
"close_reason": trade.close_reason,
|
||||
"fill_mode": trade.fill_mode,
|
||||
"trailing_stop": trailing[0] if trailing else None,
|
||||
"trailing_distance_pct": trailing[1] if trailing else None,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user