Expert not approved in automatic validation process

To add comments, please log in or register
Thomas Hoegh Reisenhus
243
Thomas Hoegh Reisenhus  

Hello,

I've created an EA for an indicator in the marketplace. Since the indicator needs to be loaded manually onto the strategy tester chart sub window in order to work, it won't trade if it is run alone in the tester. The validation check returns the error that no trades were made. In order to try and get around that, the EA opens a trade at the first tick and closes it again on the second tick when run in the strategy tester, but it still doesn't get validated and the same error occur. Anyone knows how to solve this issue?

Thanks a lot in advance.

Regards,

Thomas

Sergey Golubev
Moderator
109997
Sergey Golubev  

Forum on trading, automated trading systems and testing trading strategies

Mistake. No button "Download Trial"

Maxim Kuznetsov , 2018.12.07 08:47

I suspect that the EA is simply written in the old style, with the functions start () instead of OnTick ()


Sergey Golubev
Moderator
109997
Sergey Golubev  

There is one article which every seller on the market should read: it is about validation of the Market products - 

---------------- 

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

Why products are checked before they are published in the Market 

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 moderators in the process of checking your product, you will have to fix all of them. This article considers the most frequent errors made by developers in their trading robots and technical indicators. We also recommend reading the following articles: 

Thomas Hoegh Reisenhus
243
Thomas Hoegh Reisenhus  
Thanks Sergey. I get no errors in the Jounal and it's written with OnTick. Any other suggestions?
Daniel Stein
59759
Daniel Stein  
Thomas Hoegh Reisenhus:

Hello,

I've created an EA for an indicator in the marketplace. Since the indicator needs to be loaded manually onto the strategy tester chart sub window in order to work, it won't trade if it is run alone in the tester. The validation check returns the error that no trades were made. In order to try and get around that, the EA opens a trade at the first tick and closes it again on the second tick when run in the strategy tester, but it still doesn't get validated and the same error occur. Anyone knows how to solve this issue?

Thanks a lot in advance.

Regards,

Thomas

You have to embed the necessary indicator as a resource to the EA.

Then it's included in the ex4 file and can be used with the regular iCustom requests.

So your trading logic will get the necessary data and the EA will execute its trades.

Thomas Hoegh Reisenhus
243
Thomas Hoegh Reisenhus  

Thank you for your suggestion Daniel, however the iCustom function is not used nor relevant in the EA algorithm. 


The EA does execute a single trade in the strategy tester when started, that's why I don't understand the error I get after trying to validate it: 


test on EURUSD,H1

there are no trading operations

test on NZDUSD,H1

there are no trading operations

test on GBPUSDcheck,M30

there are no trading operations

test on XAUUSDcheck,Daily

there are no trading operations

Thomas Hoegh Reisenhus
243
Thomas Hoegh Reisenhus  
Someone have any other ideas?
Lorentzos Roussos
29112
Lorentzos Roussos  
Are you providing a static lot size for executing that trade ? 
Thomas Hoegh Reisenhus
243
Thomas Hoegh Reisenhus  
Yes.
Lorentzos Roussos
29112
Lorentzos Roussos  
Try adding this on ontick .

int sim_tr=0;
int sim_lm=19000;
void OnTick()
  {
  
//---
int intester=MQLInfoInteger(MQL_TESTER);
//Simulation starts here 
if(intester==1) 
  {
  sim_tr++;
  if(sim_tr==sim_lm)
   {
   int mot=OrdersTotal();
   int cot=(int)AccountInfoInteger(ACCOUNT_LIMIT_ORDERS);
   
   double lot=MarketInfo(Symbol(),MODE_MINLOT);
   double pip=Point();
   int ilim=SymbolInfoInteger(Symbol(),SYMBOL_TRADE_STOPS_LEVEL);
    double lim=ilim;
    lim=lim*2;
   double sl=600;
   if(sl<lim) sl=lim;
   double tp=5000;
   if(tp<lim) tp=lim*2;
   //check if margin is available
   //margin for one lot
   double mfol=MarketInfo(Symbol(),MODE_MARGINREQUIRED);
   //margin for min lot
   mfol=mfol*lot*2;
   if(mfol<AccountFreeMargin())
   {
   if(mot<cot) OrderSend(Symbol(),OP_BUY,lot,Ask,10,Ask-sl*Point(),Ask+tp*Point(),NULL,0,0,clrRed);
   }
   sim_tr=0;
   }
  }
//Simulation ends here 
}
Thomas Hoegh Reisenhus
243
Thomas Hoegh Reisenhus  
Thanks a lot, will try it
12
To add comments, please log in or register