Not Enough Money Error

 

Guys , am trying to publish my EA on the Market and I keep getting "not enough money" error .The recommendation is to try and test my EA with $1 , which is impossible coz that $1 will never be enough under any circumstance. 

The other recommended fix is to put a code not to output the error , but am still getting the same error. All my EAs are simple so I am wondering is there is anyone out there who can help me fix this please.

I am honestly tired of these errors and I am even wondering how others are able to publish their EAs , if there is anyone out there who can help  please help .Thanks 

 
What if your EA checks (and acts accordingly) the free margin before sending the order - maybe this is the idea of 1$ balance?
 
Carl Schreiber #:
What if your EA checks (and acts accordingly) the free margin before sending the order - maybe this is the idea of 1$ balance?

I am doing that , I am checking and the Mql Validation is using $1 as a test which will always fail validation .Do you have any code that passed this test please?

 

If there is any code that I can add to stop this error please send me coz I added the code to check the balance but it is still checking and when I see the log , it is starting with $1 balance and this will always fail .

If I change the lot size to 0.01 , it fails on "Error 131" >> 

expert advisor (EA) is trying to send an order with invalid trade volume
 
Tafadzwa Basilo Musekiwa #:

If there is any code that I can add to stop this error please send me coz I added the code to check the balance but it is still checking and when I see the log , it is starting with $1 balance and this will always fail .

If I change the lot size to 0.01 , it fails on "Error 131" >> 

expert advisor (EA) is trying to send an order with invalid trade volume

It is not about adding code to stop the "error". You should make your code be smart and check the balance before opening a trade.

Articles

The checks a trading robot must pass before publication in the Market

MetaQuotes, 2016.08.01 09:30

Before any product is published in the Market, it must undergo compulsory preliminary checks in order to ensure a uniform quality standard. This article considers the most frequent errors made by developers in their technical indicators and trading robots. An also shows how to self-test a product before sending it to the Market.

 
Read this part of the article:
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 in order to ensure a uniform quality standard. This article considers the most frequent errors made by developers in their technical indicators and trading robots. An also shows how to self-test a product before sending it to the Market.
Reason: