Support Board
Date/Time: Mon, 08 Jun 2026 21:34:24 +0000
Post From: Study has issue with submitting orders
| [2026-04-25 05:56:46] |
| curious16 - Posts: 47 |
|
I'd suggest this bit: exitOrder.OrderQuantity = -1*position; // 1 contract or whatever is long
looks wrong.Order quantities need to be positive. These were unsigned integers but SC changed the field to double to accommodate trading in fractional lots. The side of an order (buy or sell) is not stored in the sign of OrderQuantity. The side is determined by the command you issue to submit the order. You can use the same s_SCNewOrder structure to buy or sell. |
