Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

TradeStationBrokerageModel refuses combo order quantity updates that TradeStation supports

Open Beginner friendly
#9,842 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
78/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
csharp
Domain
fintech-quant

Research direction

Start at TradeStationBrokerageModel.CanUpdateOrder and reproduce the issue with SetBrokerageModel(BrokerageName.TradeStation), a ComboLimitOrder, and UpdateOrderFields { Quantity = 2 }. Compare the backtest result with the described TradeStation simulation behavior; done means combo quantity updates are accepted in the backtest and both legs resize from 1 to 2.

Written by the indexing model from the issue text.

Description

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
Dominant language
C#
Stars
21.7k
Forks
5.3k
Avg merge
22h 25m
Merged PRs (30d)
37

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from QuantConnect/Lean

All issues in QuantConnect/Lean

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.