Support Board
Date/Time: Sun, 24 Nov 2024 19:48:35 +0000
Post From: ACSIL: modify order
[2013-11-01 22:14:28] |
User40073 - Posts: 23 |
Hello, How to identify lastest modified order? I have a stop order, and I want to modify, and if the price is moved, then I'd like to modify again. ...
This code modify first, but my problem is, OrderID not changed, sc.GetOrderByOrderID(OrderID, TradeOrderData) give back 0, and my study run into my original first stop order which is check this:NewPrice = sc.Bid-sc.TickSize* Distance.GetDouble(); NewOrder.InternalOrderID = OrderID; NewOrder.Price1 = NewPrice; int result = sc.ModifyOrder(NewOrder); if (result>0) OrderID = NewOrder.InternalOrderID; ... if (!IsWorkingOrderStatus(TradeOrderData.OrderStatusCode))
{ NewOrder.OrderQuantity = 1; NewOrder.OrderType = SCT_ORDERTYPE_STOP; NewOrder.Price1 = sc.Ask+sc.TickSize*Distance.GetDouble(); int Result = sc.BuyEntry(NewOrder); if (Result > 0 && NewOrder.InternalOrderID != 0) OrderID = NewOrder.InternalOrderID; } So I cant recognize my order.:( thanks |