I never tried this, but for the trading blocks there is a gray output that is active in case of error (in this situation the orange one is not active), so if you connect it to the input of the same block, it should go into cycle until it finally opens the trade... somewhere.
The process of opening a pending order to trade happens on the server, I don't know if there is a way for the EA to know that something wrong happened. I mean, when the EA tells the server to trade, it waits for an answer. But in this case the EA is sitting there and doing something else.

