Cannot Upload to market

 

Not sure if this is the rigth please to post.

So, I am triyng half day to upload an EA for Gold trading to the Market. (That's my first time, and maybe also last)
Verification alwasy fail and it just give me the following output below. Hovever, the EA works on Gold and verification test is made on EURUSD, OF COURSE the sl/tp etc. are quite different on that forex pair! (this way it will never pass that "test")
Any info would be appreciated.
______________

test on EURUSD,H1 (hedging) 2023.02.14 15:32:40 failed buy stop 0.2 EURUSD at 1.08000 [Invalid price] 2023.02.14 15:32:59 failed buy stop 0.2 EURUSD at 1.08000 [Invalid price] 2023.02.14 15:33:00 failed buy stop 0.2 EURUSD at 1.08000 [Invalid price] 2023.02.14 15:33:20 failed buy stop 0.2 EURUSD at 1.08000 [Invalid price] 2023.03.10 16:40:40 failed buy stop 0.2 EURUSD at 1.06663 [Invalid price] 2023.03.10 16:40:59 failed buy stop 0.2 EURUSD at 1.06663 [Invalid price] _____________

 

Solving Automatic Validation Problems Arising During Product Submission in MQL5 Market - blog post 

The rule is: expert advisers must trade. If your robot should be used only on a specific symbol timeframe, then here is what MetaQuotes say: "Products can not apply restrictions. All limitations should be marked as recommendations in the product description."
Solving Automatic Validation Problems Arising During Product Submission in MQL5 Market
Solving Automatic Validation Problems Arising During Product Submission in MQL5 Market
  • 2017.08.07
  • www.mql5.com
If you're distributing some products for MetaTrader 4/5 via the Market, you probably know that a special "welcome" stage of automatic product validation has been added recently by MetaQuotes on the
 

Forum on trading, automated trading systems and testing trading strategies

EA cannot pass validation

Sergey Golubev, 2025.08.24 09:12

...

The checks a trading robot must pass before publication in the Market - Invalid volumes in trade operations 

============

EA should open trades for all the pairs without limitation. As to XAUUSD so you can write about it in the description for example.
From this blog post (Solving Automatic Validation Problems Arising During Product Submission in MQL5 Market) - 

The rule is: expert advisers must trade. If your robot should be used only on a specific symbol timeframe, then here is what MetaQuotes say: "Products can not apply restrictions. All limitations should be marked as recommendations in the product description."

 

The EA can trade also on forex Pairs, but suggested on Gold ( I wrote this of course in the descrition) 

What I understood, the problem is on "Invalid Price
2023.02.14 15:32:40   failed buy stop 0.2 EURUSD at 1.08000 [Invalid price]

But there is no other explanation. "Invalit price" error is quite generic error and that way it is very difficoult to fix any error.

 

Well, I triying to change SL/TP/Trail etc etc....But the Validation fail anyway.

Also more I change those Values more we go "away" from the original work of that EA and the performance will go from good to mediocre.

Maybe that is the reason there are only very few EA's that has good performance here on the market.

BTW: my EA already working on Live account.

 

The EA process for validation, when is your first time publishing, is quite hard to pass, but once you understand it, is easy. :)


For each EA the change that you need to do is specific, it is not same so you need to check the code...


I'll suggest using the strategy tester in the exact time that the EA shows, and then implementing multiple if filters and start debugging...


For this specific case of invalid price there should be an specfic command for checking this, so the solution could be as simple as adding an only if clause...


if(invalid_price)

{

Print("Invalid Price");

}

else

{

trade.buy;

trade.sell;

}

 
Osmar Sandoval Espinosa #:

The EA process for validation, when is your first time publishing, is quite hard to pass, but once you understand it, is easy. :)


For each EA the change that you need to do is specific, it is not same so you need to check the code...


I'll suggest using the strategy tester in the exact time that the EA shows, and then implementing multiple if filters and start debugging...


For this specific case of invalid price there should be an specfic command for checking this, so the solution could be as simple as adding an only if clause...


if(invalid_price)

{

Print("Invalid Price");

}

else

{

trade.buy;

trade.sell;

}

Thanks for answering me. I found a solution to that problem.
However, there has arised another problem: the verification process seems to trade with an amount of $1000 an 0.2 lotsize on Gold! that would be completaly overtrading in a real world! and of course it does not have enough money for trade and validation fail.
The EA, of course does not have that lotsize for trading and is set to 0.03 (and even if I change to 0.01 it doesn't matter) So question is: why and where the verification process is using that high lotsize if that lotsize in nowhere written in the code?
 
BTW: this is the error I get.

test on EURUSD,H1 (hedging) strategy tester report 12 total trades test on XAUUSD,D1 (hedging) 2022.02.02 09:45:15 current account state: Balance: 1000.00, Credit: 0.00, Commission: 0.00, Accumulated: 0.00, Assets: 0.00, Liabilities: 0.00, Equity 1033.20, Margin: 718.38, FreeMargin: 314.82 2022.02.02 09:45:15 calculated account state: Assets: 0.00, Liabilities: 0.00, Equity 1033.20, Margin: 1077.39, FreeMargin: -44.19 2022.02.02 09:45:15 not enough money for order [#8 sell stop 0.2 XAUUSD at 1795.07]

 
Sandro Scherrer #:
BTW: this is the error I get.

test on EURUSD,H1 (hedging) strategy tester report 12 total trades test on XAUUSD,D1 (hedging) 2022.02.02 09:45:15 current account state: Balance: 1000.00, Credit: 0.00, Commission: 0.00, Accumulated: 0.00, Assets: 0.00, Liabilities: 0.00, Equity 1033.20, Margin: 718.38, FreeMargin: 314.82 2022.02.02 09:45:15 calculated account state: Assets: 0.00, Liabilities: 0.00, Equity 1033.20, Margin: 1077.39, FreeMargin: -44.19 2022.02.02 09:45:15 not enough money for order [#8 sell stop 0.2 XAUUSD at 1795.07]

You can add another if for checking free margin, and also the minum possible lot.

Open the strategy tester on XAUUSD, D1 on 2022.02.02 and run it with the account size, you will see the why is the EA failing the test.

 
So, the verification process failed again. I have changed the code about 50 times! Now, by trying to adapt the code to work on forex pairs
where is shouldn't even be attached, the EA got messed up (before I had a high PF and low DD, now, after all this modifications the PF goes under 3) I think other publisher had the same problems and even though they could have sold their products, they chose to sacrifice performance in order to pass the automated check resulting to offer a mediocre EA to their buyers (no one with experience will trade on gold with an 0.2 lot size and $1000 deposit like the verification process does). Sure,the market is big with good audience but I am not intended to sell mediocre stuff just to sell here on market. Seeing that verification process I can say: The guys here on mql5 are for sure coders, but they haven't any clue about live trading.
Anyway, thanks for triyng to help.

 
Sandro Scherrer #:
Seeing that verification process I can say: The guys here on mql5 are for sure coders, but they haven't any clue about live trading.
Seeing what you're writing here, I can tell you're trying to publish AI-generated code of dubious reliability. Minimal programming skills are enough to prevent the validation errors you mentioned without changing the EA's behavior.