I don't know if this is progress but I got another mac system running in a VM. At first I got an OCA error on it saying the OCA was filled. I think the OCA code might have existed before like you mentioned.
So I changed how the OCA string from OCA_orderID to OCA_datetime_orderid. Now it runs perfectly on both my macs systems, and on ubuntu and windows it's doing something different altogether.
Instead of doing the sell orders, buy orders then skipping over the OCA orders, it just executes the order and closes all my positions on the spot.
I tried it with another stock this time just to rule that out. Initially it was a short for MU, so the exit position should be long. I am getting this message.
toggle quoted message
Show quoted text
OrderStatus. Id: 16 Status: PreSubmitted Filled: 0 Remaining: 82 AvgFillPrice: 0.0 PermId: 103665766 ParentId: 0 LastFillPrice: 0.0 ClientId: 0 WhyHeld:? MktCapPrice: 0.0OpenOrder. PermId:? 103665767 ClientId: 0? OrderId: 17 Account: DU5632812 Symbol: MU SecType: STK Exchange: SMART Action: BUY OrderType: TRAIL TotalQty: 6 CashQty: 0.0 LmtPrice: 0.0 AuxPrice: 1.7976931348623157e+308 Status: PreSubmittedOrderStatus. Id: 17 Status: PreSubmitted Filled: 0 Remaining: 6 AvgFillPrice: 0.0 PermId: 103665767 ParentId: 0 LastFillPrice: 0.0 ClientId: 0 WhyHeld: trigger MktCapPrice: 0.017,0,103665767: TRAIL BUY 6@0 GTDOpenOrder. PermId:? 103665768 ClientId: 0? OrderId: 18 Account: DU5632812 Symbol: MU SecType: STK Exchange: SMART Action: BUY OrderType: MKT TotalQty: 6 CashQty: 0.0 LmtPrice: 0.0 AuxPrice: 0.0 Status: PreSubmitted18,0,103665768: MKT BUY 6@0 DAYOrderStatus. Id: 18 Status: PreSubmitted Filled: 0 Remaining: 6 AvgFillPrice: 0.0 PermId: 103665768 ParentId: 0 LastFillPrice: 0.0 ClientId: 0 WhyHeld:? MktCapPrice: 0.0disconnecting