Skip to content

Buying power validation for combo orders updates #8567

Description

@jhonabreul

Expected Behavior

Buying power validation is done for combo orders, so that updates are rejected if margin is not enough for the requested new order settings.

Actual Behavior

Buying power validation is done only for individual orders and skipped for combo orders.
See #8553.

Potential Solution

OrderTicket.Update might have an overload to take a collection of updates for each leg of a combo, and updates request can be queued in a batch together. That way the brokerage transaction handler can validate the buying power for the whole combo.

Reproducing the Problem

See #8553 and comment out if (order.GroupOrderManager == null) in BrokerageTransactionHandler.HandleUpdateOrderRequest() to allow updates to combo orders legs. The regression algorithms that update combo orders start failing.

System Information

Windows 11

Checklist

  • I have completely filled out this template
  • I have confirmed that this issue exists on the current master branch
  • I have confirmed that this is not a duplicate issue by searching issues
  • I have provided detailed steps to reproduce the issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions