Login Page - Create Account

Support Board


Date/Time: Sun, 19 May 2024 04:36:46 +0000



Post From: IsWorkingOrderStatus() with server-side bracket OCO

[2015-10-07 03:53:46]
User35525 - Posts: 180

If you know the order ID of the parent order, simply iterate through the orders looking for the order with that same ID and then see if it is working. Why would that be difficult?

Thanks, I will have to do some more testing I guess. From my tests so far, the order status is always SCT_OSC_FILLED, and because of that, IsWorkingOrderStatus() ALWAYS returns false. This happens in scconstants.h in ASC_Source:

inline bool IsWorkingOrderStatus(SCOrderStatusCodeEnum OrderStatusCode)
{
  switch (OrderStatusCode)
  {
    case SCT_OSC_ORDERSENT:
    case SCT_OSC_PENDINGOPEN:
    case SCT_OSC_OPEN:
    case SCT_OSC_PENDINGCANCEL:
    case SCT_OSC_PENDINGMODIFY:
    case SCT_OSC_PENDINGCHILD:
    case SCT_OSC_PENDING_CANCEL_FOR_REPLACE:
    return true;
    
    default:
    return false;
  }
}

I know SC doesn't do any management of server-side bracket orders, once accepted by the broker, but there does need to be a way to monitor those orders using FIX messaging, to determine if they're still working.

Let me get back with you after I've done more live testing, as I was doing a lot of coding with simulated orders earlier
Date Time Of Last Edit: 2015-10-07 04:09:59