Skip to content

TradeStationBrokerageModel refuses combo order quantity updates that TradeStation supports #9842

Description

@AlexCatarino

Expected Behavior

TradeStationBrokerageModel.CanUpdateOrder allows updating the quantity of a combo order, which TradeStation supports: the replace quantity resizes the whole spread.

Actual Behavior

It refuses it with NotSupported - Order type 'ComboLimit' is not supported to update quantity in the TradeStationBrokerageModel.. Live trading skips the brokerage model on updates, so after QuantConnect/Lean.Brokerages.TradeStation#107 live resizes the combo while a backtest refuses it.

Same algorithm, ComboLimitOrder AAPL call vertical x1, then tickets[0].Update(new UpdateOrderFields { Quantity = 2 }):

  • Live (TradeStation sim, order 972926320): UpdateSubmitted on both legs; the broker holds Buy 2 / Sell 2.
  • Backtest: refused by the brokerage model; legs stay 1 / -1.

Potential Solution

Remove the combo quantity check from TradeStationBrokerageModel.CanUpdateOrder.

Reproducing the Problem

Backtest with SetBrokerageModel(BrokerageName.TradeStation), place a ComboLimitOrder and update one leg's quantity.

System Information

Lean master.

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions