Support Board
Date/Time: Thu, 28 Nov 2024 22:54:39 +0000
Post From: Modifying a Stop Limit Opened Order
[2023-04-04 21:32:26] |
User687593 - Posts: 6 |
Now, I've included the Internal Order ID, to confirm that I'm getting the Order I'm looking for. I've attached the Log, showing the Order ID, but the price is cero before and after modifying it. Thanks for your support. if( shiftPressed && sPressed ){ SCString Message; while(sc.GetOrderByIndex(i, order) != SCTRADING_ORDER_ERROR) { i++; if (order.OrderStatusCode == SCT_OSC_OPEN && order.OrderTypeAsInt == SCT_ORDERTYPE_STOP_LIMIT) { s_SCNewOrder ModifyOrder; Message.Format("Order ID: %i and Order Price: %i",order.InternalOrderID, order.Price1); sc.AddMessageToLog(Message, 1); ModifyOrder.InternalOrderID = order.InternalOrderID; ModifyOrder.OrderType = SCT_OSC_OPEN; float price = 4160.25; ModifyOrder.Price1 = price; Message.Format("ModifyOrder ID: %i and ModifyOrder Price: %i",ModifyOrder.InternalOrderID, ModifyOrder.Price1); sc.AddMessageToLog(Message, 1); sc.ModifyOrder(ModifyOrder); break; } } } |
Log File 2.PNG / V - Attached On 2023-04-04 21:32:19 UTC - Size: 12.62 KB - 79 views |