Please help me with the Auto Validation Test

 

Hello, everybody.

I try to submit a new EA in the Market section.
the Auto Validate reports that Initialization Failed because of the error: "Don't Close Expert Forcibly"!
I don't use the ExpertRemove() function.

So, is there any other possible reason for this error?

 
Another point, the Validation state that there are no trading operations, while I already have the EA running on a real account!

I back-tested the EA with different:
1. Amounts of deposits.
2. Symbols.
3. Time-frames.
4. Lot Size.

And it works fine on the System Tester, as in the real world.

So, why it tells me that there are no trading operations?
 
Muhammad Elbermawi:
...

So, why it tells me that there are no trading operations?

Look at this thread where I collected some information: https://www.mql5.com/en/forum/362754

no trading operations
no trading operations
  • 2021.02.13
  • www.mql5.com
I want to upload an expert to the market, but it gives a warning as follows, how will this problem be solved, thanks...
 
Sergey Golubev:

Look at this thread where I collected some information: https://www.mql5.com/en/forum/362754

The guy who made this thread did not solve his problem too!
 
I think that I found the solution after breaking my code into pieces and re-examining it several times.
The "MQL5 website validation system" can not read the history of the trades done in its test.

Let me explain what I mean. My expert advisor reads the history of the last few trades then it takes the next trade depending on it. As an example, if the last two trades were losers then double the lot size of the next order. This will work fine in the real world and on the system tester but it will fail to pass the validation process with an error that says "no trading operations" and all other errors that show instability.

So, if I am correct then, what should I do to publish the EA on the market?
Documentation on MQL5: Constants, Enumerations and Structures / Trade Constants / Trade Operation Types
Documentation on MQL5: Constants, Enumerations and Structures / Trade Constants / Trade Operation Types
  • www.mql5.com
Trade Operation Types - Trade Constants - Constants, Enumerations and Structures - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
 
Muhammad Elbermawi:
The guy who made this thread did not solve his problem too!

He did not solve because he confused about validation.
Because the validation is not about the following only: EA works in backtesting and demo/real trading or not.
The validation is also about protection of the buyers: check volume/lot size, check enough money, and more.
Example:

Forum on trading, automated trading systems and testing trading strategies

there are no trading operations

Yong Zhang, 2017.09.13 06:23

I know the reason, but it's not yet solved

Before the order is sent, it needs to be checke the money , I used the codeBase instance function:CheckMoneyForTrade

Found that delete this function will not appear:“there are no trading operations”

But this function is necessary

        
        
        

bool CheckMoneyForTrade(string symb,double lots,ENUM_ORDER_TYPE type) { //--- Getting the opening price MqlTick mqltick; SymbolInfoTick(symb,mqltick); double price=mqltick.ask; if(type==ORDER_TYPE_SELL) price=mqltick.bid; //--- values of the required and free margin double margin,free_margin=AccountInfoDouble(ACCOUNT_MARGIN_FREE); //--- call of the checking function if(!OrderCalcMargin(type,symb,lots,price,margin)) { //--- something went wrong, report and return false Print("Error in ",__FUNCTION__," code=",GetLastError()); return(false); } //--- if there are insufficient funds to perform the operation if(margin>free_margin) { //--- report the error and return false Print("Not enough money for ",EnumToString(type)," ",lots," ",symb," Error code=",GetLastError()); return(false); } //--- checking successful return(true); }

and read this page as an example (some posts): https://www.mql5.com/en/forum/350461/page3
Snd yes - some things are not disclosed ..
Please Help
Please Help
  • 2020.09.07
  • www.mql5.com
Please Help What is the solution to this problem ?? Please help and thank you...
 
Muhammad Elbermawi:
if the last two trades were losers then double the lot size of the next order. This will work fine in the real world and on the system tester but it will fail to pass the validation process with an error that says "no trading operations" and all other errors that show instability.

So, if I am correct then, what should I do to publish the EA on the market


  1. Assuming real/demo trading has history?
  2. code to check the previous history, if none, proceed with default setting.
 
Sergey Golubev:

He did not solve because he confused about validation.
Because the validation is not about the following only: EA works in backtesting and demo/real trading or not.
The validation is also about protection of the buyers: check volume/lot size, check enough money, and more.
Example:

and read this page as an example (some posts): https://www.mql5.com/en/forum/350461/page3
Snd yes - some things are not disclosed ..

I apologize if you misunderstood me.
I know that MQL5 does its best to provide traders with the best trading tools.

I rechecked the code again and I got the same results. The validation system does not read its history. So, I hope it does in the future (or until somebody proves that I am wrong).

Thanks for your help.

 
Muhammad Elbermawi:

Hello, everybody.

I try to submit a new EA in the Market section.
the Auto Validate reports that Initialization Failed because of the error: "Don't Close Expert Forcibly"!
I don't use the ExpertRemove() function.

So, is there any other possible reason for this error?

Another point,

I guess that the ExpertRemove() function have  nothing to do with the validation error  "Don't Close Expert Forcibly".

So, there should be another reason for this error message but I didn't figure it out.

Reason: