Support Board
Date/Time: Mon, 23 Dec 2024 18:53:36 +0000
Post From: s_SCTradeOrder order lifetime
[2015-10-02 19:42:23] |
User35525 - Posts: 181 |
Thanks about sc.GetAttachedOrderIDsForParentOrder(). For IsWorkingOrderStatus(), it was my error since this compiles: if (!IsWorkingOrderStatus(OrderDetails.OrderStatusCode)) continue;
But not this: int sid= OrderDetails.OrderStatusCode; if (!IsWorkingOrderStatus(sid)) continue; This was the compiler error: error: invalid conversion from 'int' to 'SCOrderStatusCodeEnum' [-fpermissive] if (!IsWorkingOrderStatus(sid)) continue; However this compiles: int sid= OrderDetails.OrderStatusCode; if (sid == SCT_OSC_FILLED){ //stopped-out. ... I think sc would need to provide "int StatusCodeTypeAsInt;" and "StatusCodeTypeAsInt(0)" within scstructures.h, and "bool IsWorkingOrderStatus(int OrderStatusCode)" within scconstants.h, for my example to be worksable. I don't need it, but see that it might be useful to somebody later. Then this would work: int sid= OrderDetails.StatusCodeTypeAsInt; if (!IsWorkingOrderStatus(sid)) continue; Date Time Of Last Edit: 2015-10-02 19:50:45
|