I'm kinda of new in MQL5.
I have an EA that buys one stock first (let's say PETR4) and then buys another one (let's say ABEV3).
The only problem is that I can only order the second one when the first one is executed (not only placed).
I used the MqlTradeResult.retcode to get the return number, but that only shows if the order has been placed and I need to know if the order has been filled in order to continue with the second operation.
Can anyone help me? Thanks