Support Board
Date/Time: Thu, 28 Nov 2024 22:26:06 +0000
Post From: Modifying a Stop Limit Opened Order
[2023-04-04 14:07:23] |
User687593 - Posts: 6 |
Hi there ...! I'm working on a Order Modification app to change price of a Stop Limit Opened order, tick by tick, using a keyboard. I managed to identify the order I want to modify, but no way I'm able to change the price. Any help will be appreciated. Thanks. if( shiftPressed && sPressed ){ while(sc.GetOrderByIndex(i, order) != SCTRADING_ORDER_ERROR) { i++; if (order.OrderStatusCode == SCT_OSC_OPEN && order.OrderTypeAsInt == SCT_ORDERTYPE_STOP_LIMIT) { s_SCNewOrder ModifyOrder; ModifyOrder.InternalOrderID = order.InternalOrderID; ModifyOrder.OrderType = SCT_OSC_OPEN; float price = 4160.25; ModifyOrder.Price1 = price; sc.ModifyOrder(ModifyOrder); break; } } } |