Appearance
Personalize your experience
Multi-Leg Partial Fill Recovery & Orphan Leg Neutralization
Algorithmic TradingWhat your execution engine must do when Leg 1 of an Iron Condor fills and Leg 2 gets rejected by a price band.
Core Architecture & Intuition
What your execution engine must do when Leg 1 of an Iron Condor fills and Leg 2 gets rejected by a price band. Within the Algorithmic Trading curriculum (Grid & Execution Engines → Smart Order Routing), this topic establishes the concrete quantitative rules and execution mechanics required for live market deployment.
Professional desks never rely on ambiguous visual guesses for partial fill. Instead, every entry, invalidation level, and risk parameter is defined mathematically before a single order reaches the exchange gateway.
Hover over key terms below for instant definitions: Partial Fill, Orphan Leg, and Multi-Leg Execution. For the complete mathematical derivation and edge-case analysis, open .
Interactive Concept Breakdown
- Partial Fill — Core structural driver governing multi-leg partial fill recovery & orphan leg neutralization.
- Orphan Leg — Prevents premature entries and enforces mechanical discipline across Smart Order Routing.
- Multi-Leg Execution — Ensures worst-case scenario losses stay strictly within predetermined R-multiple budgets.
Step-by-Step Execution Protocol: Smart Order Routing
- 11. Pre-Session Calibration & Regime CheckMeasure baseline volatility and liquidity parameters for partial fill prior to market open.
- 22. Mechanical Signal ConfirmationWait for a completed bar close confirming the orphan leg threshold—never pre-empt mid-candle.
- 33. Risk-Normalized Sizing & Order PlacementCompute exact lot quantity from the invalidation distance and dispatch via a Marketable Limit order.
- 44. Post-Trade Telemetry & AuditLog arrival price, fill slippage, and MAE/MFE metrics against the Smart Order Routing benchmark.
Parameters, Rules & Reference Matrix
| Parameter / Rule | Type | Default | Description |
|---|---|---|---|
| primaryThreshold* | float | Calibrated per ATR | Core quantitative trigger governing Multi-Leg Partial Fill Recovery & Orphan Leg Neutralization. |
| confirmationWindow | bars | 1 closed bar | Requires full bar closure to eliminate intrabar repainting. |
| maxRiskAllocation | % equity | 0.5% - 1.0% | Maximum capital at risk if invalidation level is hit. |
Implementation & Quantitative Model
export function resolveMultiLegState(filledLegs: number, totalLegs: number, elapsedMs: number, timeoutMs = 3000) { if (filledLegs === totalLegs) return "COMPLETE"; if (elapsedMs >= timeoutMs && filledLegs > 0) return "EMERGENCY_UNWIND_FILLED_LEGS"; return "AWAITING_REMAINDER";}Desk Verification Checklist
Confirm before deploying live capital
- Confirm Smart Order Routing regime alignment before enabling entries.
- Verify candle closure beyond the trigger threshold (no intra-bar guessing).
- Size position strictly from the distance to the structural invalidation point.
Cross-reference standard risk definitions such as drawdown, slippage, and when auditing your logs.
More in Smart Order Routing
- Passive Bid/Ask Pegging & Progressive Limit-Chasing Algorithms
Capturing maker spread improvements by starting at Mid-Price and stepping toward Best Ask/Bid over a 3-second schedule.