Support Board
Date/Time: Sat, 07 Jun 2025 23:39:03 +0000
[Programming Help] - Trading system, send new order after limit order fill
View Count: 355
[2023-02-06 23:28:44] |
devilvi - Posts: 2 |
Hi, I need to find out how I can detect an order is filled in an automated trading system. For example. I place a LIMIT BUY order under the price but when that order is filled, I want to place an extra order above the price to add more position. How can I trigger when the order is filled but in realtime calculation (not at the bar close)? I have something like this but it's like it does not detect this in realtime I have also set sc.UpdateAlways = 1; (but nothing seems to work) s_SCTradeOrder TradeOrder; int r_Entry_1_InternalOrderID = Order_1.InternalOrderID; if (r_Entry_1_InternalOrderID != 0){ int Order_1_StatusCode = TradeOrder.OrderStatusCode; if (Order_1_StatusCode == SCT_OSC_FILLED){ .......etc } thanks Date Time Of Last Edit: 2023-02-07 23:37:29
|
[2023-02-09 20:08:38] |
ForgivingComputers.com - Posts: 1063 |
When you submit the first order, check the return value. If positive, it was successful. int Result = sc.BuyEntry(NewOrder);
if (Result > 0) { // Submit extra order above price here } |
To post a message in this thread, you need to log in with your Sierra Chart account: