Login Page - Create Account

Support Board


Date/Time: Thu, 28 Nov 2024 22:50:41 +0000



Post From: Modifying a Stop Limit Opened Order

[2023-04-04 17:01:11]
User687593 - Posts: 6
Oh .. good point.

I've modified the code to print the Log, and I'm getting Price = 0

So, the question is now why the price of the order that I've identified and want to change, has the price 0 ?

Log attached.

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 Price: %i",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 Price: %i",ModifyOrder.Price1);
sc.AddMessageToLog(Message, 1);

sc.ModifyOrder(ModifyOrder);
break;

}
}

}

imageLog File.PNG / V - Attached On 2023-04-04 16:59:04 UTC - Size: 8.6 KB - 77 views