发布

  • 17326 b27e9e67dd

    ProcessSplitSymbols crashes during live/paper trading warmup with InvalidOperationException #9029 (#9030)

    frostbyte_neo 发布于 2025-10-13 16:21:09 +00:00 | 331 次提交 在此版本后已推送到 master

    • Fix ProcessSplitSymbols crash during live mode warmup

    Fixes InvalidOperationException when CancelOpenOrders is called during warmup in live/paper trading mode.

    When historical splits are replayed during live mode warmup, ProcessSplitSymbols attempts to cancel open orders for option contracts, but CancelOpenOrders throws an exception during warmup.

    The fix adds an early return when algorithm.LiveMode && algorithm.IsWarmingUp. This is safe because in live/paper trading, current positions already reflect historical splits.

    Includes unit tests validating the fix.

    • Some improvements and more tests
    • Ignore splits during warmup for backtesting and live trading. Adding a
      regression algorithm reproducing issue
    • Minor fix

    Co-authored-by: Martin Molinero martin.molinero1@gmail.com

    下载附件