I got a problem with a strategy. I use exitLongLimit/stop and enterLongLimit. It seems to work fine in the beginning but while I used a lot of exits it seems that the oco doesn't work. My logic is very simple, I simulate a trail stop using exitlongstop a lot of times, and I simulate a double target thanks to the quantity of my orders.
The scenario that makes me crazy is the following one:
I buy 100 contracts of some currency
I place an exit limit for 60 contracts and an exit stop for 100 contracts.
We reach our target so I place an exit limit for 40 contracts and an exit stop for 40 contracts.
We can reach a level that makes me activate the trail stop ( an other call to exitstop with the good quantity)
Then we assume the prices went down and then I activate the exit stop. The result is that the target 2 still alive and the quantity change to 24.
The log/ Trace files don't show something weird. It is like I did it is impossible from the moment that I modify the target 2 only and only if when the target1 is crossed. I can't understand the problem and I am trying to reproduce it but I got issues with this, I doesn't know why the order update refuse to work. I attached my try which doesn't work.
Thank you in advance,
R.E.

Comment