Stale Order Max Age
What it does
Working orders still open (PENDING, ACCEPTED, or PARTIAL fill) after this many minutes are treated as stale and cancelled at the broker. If the stale order was the open leg of a roll, the roll is flagged as HALF_ROLLED for manual review. Prevents stale orders from cluttering the order book and occupying buying power indefinitely.
When to change it
Raise to 60 if you frequently trade illiquid names where fills take longer. Lower to 15 for highly liquid names where a 30-minute unfilled order is likely mispriced.
Safe range
15 (fast cancel) to 60 (patient).
Example
Iron condor close order submitted at 10:00 AM at mid. Not filled by 10:30 AM. Stale order cancel fires. Bot may re-evaluate and resubmit at adjusted price on the next cycle.