Support Board
Date/Time: Fri, 29 Nov 2024 02:57:17 +0000
Post From: %d, %s; %f ?
[2023-03-07 13:53:34] |
BenjFlame - Posts: 324 |
ok thanks. Here is the code I'm using: if (sc.MenuEventID == 6) { s_SCNewOrder NewOrder; NewOrder.OrderQuantity = 1; NewOrder.OrderType = SCT_ORDERTYPE_MARKET; NewOrder.TimeInForce = SCT_TIF_GOOD_TILL_CANCELED; int Result = sc.BuyEntry(NewOrder); // Order data s_SCOrderFillData OrderFillData; sc.GetOrderFillEntry(sc.GetOrderFillArraySize() - 1, OrderFillData); // Log SCString DebugMessage; SCString symbol = OrderFillData.Symbol; uint32_t OrderQuantity = OrderFillData.Quantity; DebugMessage.Format( "OrderID: %u, Symbol: %s, FillTime: %s, Type: %u, Quantity: %u, FillPrice: %f, PositionQuantity: %u; IsSimulated: %u", OrderFillData.InternalOrderID, symbol, OrderFillData.FillDateTime, OrderFillData.BuySell, OrderQuantity, OrderFillData.FillPrice, OrderFillData.TradePositionQuantity, OrderFillData.IsSimulated ); sc.AddMessageToLog(DebugMessage, 1); } Several problems: - Symbol doesn't seem to display a string... it displays a binary character. Data is supposed to be a string, so I don't know why. - Same problem for Fill time: how to display that one ? Last: Position quantity is always 0. Even if I stack orders (I'm in simulated environment). If you have clues on how to solve theses... thank you |