Support Board
Date/Time: Sun, 24 Nov 2024 16:26:28 +0000
Post From: Order events?
[2024-05-25 17:05:29] |
ForgivingComputers.com - Posts: 960 |
Looks like it is for placing an order from a study? I'm looking for a way to get details new order placed via chart/keyboard short cut etc..
You place orders with the s_SCNewOrder structure. The s_SCTradeOrder is for orders that exist(ed). if (OrderID != 0)
{ s_SCTradeOrder TradeOrderData; int Result = sc.GetOrderByOrderID(NewOrder.InternalOrderID, TradeOrderData); if (Result != SCTRADING_ORDER_ERROR) { double FillPrice = TradeOrderData.AvgFillPrice; } int OrderStatusCode = TradeOrderData.OrderStatusCode; if (OrderStatusCode == SCT_OSC_FILLED) { // The order has completely filled } } |