mql5 not accepting my EA: The amount of open and pending orders has reached the limit set by the broker
-
Hi All,
The mql5 market is not accepting an EA that I built using fxdreema!
It's giving me this error: The amount of open and pending orders has reached the limit set by the broker
Does anyone what that is, and how to fix it, please?

It takes me to the following page when I click on 'How to fix': https://www.mql5.com/en/articles/2555#account_limit_pending_orders
I still don't understand what's wrong or how to fix it. The EA successfully passed a 21 years backtest using tickdata on MT4.
Your help is much appreciated.
-
I found the solution!
I copied the function on the mql5 website (https://www.mql5.com/en/articles/2555#account_limit_pending_orders) and added it near the end of the mq4 file

And then updated the only OrderSend call as follows:

Code has now been accepted, and my EA is live in the mql5 market

-
Here's the EA by the way: https://www.mql5.com/en/market/product/117073
MT5 version coming soon

-
@refaey Thank you very much for sharing.
-
Now I'm getting this for the MT5 version!


Well, I guess I need to do something similar to the above
