I am not sure that it will help ... but gound some information about how to test (and what to check) EAs before publishing on the Market -
----------------
Insufficient funds to perform trade operation
It is recommended to test a trading robot with a deliberately small size of the initial deposit, for example, 1 USD or 1 Euro.
If a check shows that there are insufficient funds to perform a trade operation, it is necessary to output an error message to the log instead of calling the OrderSend() function.
Forum on trading, automated trading systems and testing trading strategies
Validation failed - tester not enough money
Nitin Raj, 2019.03.22 11:19
The EA must check for the available margin before sending the order request.
https://www.mql5.com/en/articles/2555
Thanks for your response!
This guide regard how to avoid this error when putting EA on market. I've done it on my commercials EA that I put on the market... This is only to avoid that error and generate a simple log message.
In my case, the EA that I'm using is only personal and I can have error, but this one is totally no sense.
Although, after the first error failed, I've opened other pending orders that are triggered (and after that, opened) correctly...
So strange....
Thanks for your response!
This guide regard how to avoid this error when putting EA on market. I've done it on my commercials EA that I put on the market... This is only to avoid that error and generate a simple log message.
In my case, the EA that I'm using is only personal and I can have error, but this one is totally no sense.
Although, after the first error failed, I've opened other pending orders that are triggered (and after that, opened) correctly...
So strange....
I know that it is personal EA (i am not a coder; and the information from previous posts are the only ones i found sorry).
But I understood that it may be something related to the code (or coding) as well.
Besides, pending orders are affected on it too together with the market orders.
Means: you can put in your EA more codes for checking incl for pending orders as well - because it is written there in the article:
Keep in mind that even placing a pending order may require collateral — margin

- www.mql5.com

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello,
I've opened a new demo account yesterday ($1000) and I attached an EA to it: the same EA that I'm using on other accounts (both demo and real) and also with less money and bigger lot sizes.
At the first order trigger I got "not enough money" error. (The EA trying to open a 0.02 order on GBPUSD and my leverage is 1:500, so about £4 GBP of margin required.)
It seems like the account is empty but my balance is correct and it is $1000, like the equity and the free margin.
Someone else have had a problem like this? Do I need only to wait?
Thanks