Not enough money on newly opened account

 

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

 

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.

 

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....

 
Fabio Cavalloni:

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

The checks a trading robot must pass before publication in the Market
The checks a trading robot must pass before publication in the Market
  • www.mql5.com
Before any product is published in the Market, it must undergo compulsory preliminary checks, as a small error in the expert or indicator logic can cause losses on the trading account. That is why we have developed a series of basic checks to ensure the required quality level of the Market products. If any errors are identified by the Market...
 
Yes the problem is for sure related to margin check. If I develop the functions to check I can avoid the error but I'll have a log: no required margin available. I have it, I'm thinking that the problem is related to the fact that account was created some hours ago and maybe a mt4 platform restart can solve the problem..thanks again for your support
Reason: