Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

TradeStationBrokerageModel refuses combo order quantity updates that TradeStation supports

Đang mở Phù hợp với người mới
#9,842 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
78/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
csharp
Lĩnh vực
fintech-quant

Hướng nghiên cứu

Bắt đầu tại TradeStationBrokerageModel.CanUpdateOrder và tái hiện vấn đề với SetBrokerageModel(BrokerageName.TradeStation), một ComboLimitOrder và UpdateOrderFields { Quantity = 2 }. So sánh kết quả backtest với hành vi mô phỏng TradeStation được mô tả; được xem là hoàn tất khi các cập nhật số lượng combo được chấp nhận trong backtest và cả hai legs đều được thay đổi từ 1 thành 2.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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
Ngôn ngữ chính
C#
Star
21.7k
Fork
5.3k
Merge trung bình
22 giờ 25 phút
Pull request đã merge (30 ngày)
37

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của QuantConnect/Lean

Tất cả issue của QuantConnect/Lean

Issue tương tự

Thêm issue về C#

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.