Your wife and you are using the same code and the same version of QT, trading thI mean it's been running for few months, i've had multiple sesssions where i had orders broken up. But today, something happened...
If I may.I checked the MT5 terminal to see a different view of the trades, and found the issue:
View attachment 322100
Basically the sequnce should be this:
buy or sell stop entry
set limit target
cancel other order
set reverse order
So the time difference betwen 4 (3+1) contracts entry and the first target hit (just on 3) is like 100ms.
It seems like today, it was so quick that it only had time to set a buy limit on 3 lots instead of 4, ending up screwing over the whole algo sequence leaving a naked reverse order.
I think the best way to fix this is just have a TIMER sequence initiated anytime a LIMIT order is filled. This could cause some losses because sometimes the market would reverse right off the level and only execute some lots. But it's much better than to have a naked order left open like today.
Partial lots has been the bane of my algo existence
I suggested you the same thing in the past if I remember well.
DON'T USE TIMER for your sequence of events.
Your move should be based on status of your previous event (not sure if it's possible with QT).
When one event is completely done, you do the next, and so on.
Timers will get you different problems.
Also, don't do multithreading.
Single thread is king.
Time to start learning coding my friend....
