I have another update (my problem is fixed, but I am worried about how it was fixed), I was hoping someone else can confirm this about OCA orders.
I am using twsapi 10.19 (Stable). NOT 10.20(latest) for my code base.
I have tried the following on ubuntu, windows and mac ventura (apple silicon) (both gateway and tws).
I have been using 10.19 all this time, and the only platform that worked was mac. I realised that I accidentally clicked latest on my mac and that's what it was working.
This is the behaviour I experienced after I tried the same version on all the platforms.
So, on tws/gateway 10.19 with the 10.19api on all platforms ubuntu, mac and windows.:
OCA (stoploss + close at time) orders fill immediately after they are posted.
So after I switched all my platforms to latest gateway and tws (i think its 10.22), my twsapi 10.19 which is stable, works properly!:
OCA (stoploss + close at time) orders stay in the system and do not do anything until they are supposed to
Is this how it's supposed to work? Should I be using the latest gateway/tws with the stable code?
I am worried that if they have another update it is going to break my code again.