Skip to content

Route a rule's conditional entry as a genuine resting order (limit/stop) — deferred until a price-conditional rule earns it #333

Description

@eaitbrahim

Split out of #260, which shipped the minimum viable mitigation in #332 (the routing-time WARNING when intent.entry deviates materially from the preview's best_ask). The full remediation #260 describes stays deliberately deferred, per its own reasoning: upgrading money-moving order routing to rescue pullback_continuation — measured at gross PF 0.7736 under the faithful engine — is a bad trade. This issue carries the remaining work for WHEN a price-conditional rule is actually on the table (a research brief that survives, a new rule kind whose edge lives in its entry condition):

  • Route Setup.entry as a genuine resting limit (entry below market) or stop (entry above market) order rather than short-circuiting to market.
  • Track and reconcile the resting order across cycles — execution/reconcile.py owns order lifecycle, and an unfilled entry order is a new state it does not currently model.
  • Decide a cancel/replace policy: engine.evaluate re-derives the setup every cycle and would otherwise stack orders.
  • Revisit The simulator fills at a price live never waits for: entries are market orders in production, resting orders in backtest #257's fill model: with real resting orders, the simulator's touch-fill semantics become approximately correct again for those rules, and the two engines must agree per-rule rather than globally.

Until then, #332's warning is the guard: any rule whose entry encodes a condition fires executor.entry_override_market_routed at routing time, so the bypass is visible order by order.

Metadata

Metadata

Assignees

Labels

prerequisiteBlocks other issues; do first

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions