Download MetaTrader 5

Really disappointed with ATC 2012

To add comments, please log in or register
Joaquin Poudereux
489
Joaquin Poudereux  

This is the third consecutive year I try to participate in the ATC contest. This year my EA passed the tests, as in previous years.

2 days before deadline I read this post from MetaQuotes:

https://championship.mql5.com/2012/en/news/159

Which explains perfectly what happened to my EA in ATC 2011: https://championship.mql5.com/2011/en/users/yokinfx

I checked my EA for this year's contest, and it happened again!! I had my EA ready since several weeks ago, and now in less than 2 days had to modify its code to make it synchronize correctly the histories!!

And... What's the result? This:

https://championship.mql5.com/2012/en/users/yokinfx/expert

An error has emerged, due to the changes I made in the last minute. It's not worth saying that I tried my EA dozens of times, and I didn't get that error, and that the EA also passed MetaQuotes tests successfully, several times.

Another thing I would like to point out: the name of the ea appears uncompiled. Thanks, MetaQuotes, for the confirmation I needed about if you had access or not to our codes. Now it's clear to me that you have access to all eas, be it compiled or not, and that you can do whatever you want with those eas.

Just one more thing: This article you published when it was one month left until the beginning of the contest, is important enough to be in the rules section of the contest. AND if it that is rule our EAS MUST accomplish, your preliminary tests SHOULD check this also. What's the use of your checks, then? My EA passed these tests 6 times!!!

As I said, I'm really disappointed now. You can't imagine the amount of hours I've invested in this EA.

One Month Left Before Registration Deadline - Automated Trading Championship 2012
  • championship.mql5.com
Registration at the Automated Trading Championship 2012 for everyone to challenge for real $ 80,000 will end very soon. While there is time, we strongly encourage all the contenders to test their Expert Advisors before sending them for testing. If you successfully test your trading robot in environment closest to the Championship conditions, you significantly increase your chance to join the competition. Read on to learn how to do it.
Rashid Umarov
Admin
12054
Rashid Umarov  
yokinfx:

Just one more thing: This article you published when it was one month left until the beginning of the contest, is important enough to be in the rules section of the contest. AND if it that is rule our EAS MUST accomplish, your preliminary tests SHOULD check this also. What's the use of your checks, then? My EA passed these tests 6 times!!!

As I said, I'm really disappointed now. You can't imagine the amount of hours I've invested in this EA.

Have you launched your EA without history on chart from the command line as it descrubed in the news One Month Left Before Registration Deadline ?

You can also prepare the file manually. Select the Default profile in your terminal, close all its charts and open the one required for your Expert Advisor. Start your Expert Advisor with the default parameters and enable trading for it. Close the terminal - the chart01.chr file for running from the command line is ready.


Why is it Important to Handle a Situation when Historical Data are not Ready

How are Expert Advisors started in the Championship? Organizers lease a few dozen servers for the three months of the competition. Several dozens of MetaTrader 5 client terminals are installed in separate folders - one folder for each participant. One chart with the required symbol and timeframe is opened in each of the terminals.

For each client terminal, the entire available M1 history will be loaded then. But the first time the historical data are accessed, some time will be spent to build bars of the corresponding timeframe.

The Championship starts on October 1, 2012 on the night of Monday, when trading in the Forex market opens. Trading server starts sending quotes to the terminals with participating Expert Advisors, and at this moment hundreds of EAs simultaneously start working with the arrival of the first tick. Terminals begin to synchronize with the trading server, and there is a huge influx of requests from hundreds of terminals.

At that point there will be a peak traffic, and not all the terminals will receive the requested data at once. If your Expert Advisor is not ready for such a situation, in the absence of information about the market environment, it may fail to initialize and leave the competition at the very start.

Therefore, completely remove the history, as if you do not have it yet, and run your terminal from the command line, so that your terminal has minimum of time to prepare data for your Expert Advisor. If you detect any errors in your EA during such testing, you will still have time to fix them.

One Month Left Before Registration Deadline - Automated Trading Championship 2012
  • championship.mql5.com
Registration at the Automated Trading Championship 2012 for everyone to challenge for real $ 80,000 will end very soon. While there is time, we strongly encourage all the contenders to test their Expert Advisors before sending them for testing. If you successfully test your trading robot in environment closest to the Championship conditions, you significantly increase your chance to join the competition. Read on to learn how to do it.
Rashid Umarov
Admin
12054
Rashid Umarov  
yokinfx:

Another thing I would like to point out: the name of the ea appears uncompiled. Thanks, MetaQuotes, for the confirmation I needed about if you had access or not to our codes. Now it's clear to me that you have access to all eas, be it compiled or not, and that you can do whatever you want with those eas.

What do you mean? If your EA is compliled as Quant.ex5 what do you expect to see in your terminal Journal? Which EA name should be typed there?

2012.10.01 10:03:58 '1110438': scanning network finished
2012.10.01 10:03:55 '1110438': scanning network for access points
2012.10.01 04:03:58 '1110438': scanning network finished
2012.10.01 04:03:54 '1110438': scanning network for access points
2012.09.30 23:59:25 expert Quant (EURUSD,H1) removed
2012.09.30 23:23:06 '1110438': terminal synchronized with MetaQuotes Software Corp.
2012.09.30 23:23:06 '1110438': authorized on MetaQuotes-Demo through Access Point Europe
2012.09.30 23:23:03 '1110438': connection to MetaQuotes-Demo lost
2012.09.30 22:22:04 '1110438': terminal synchronized with MetaQuotes Software Corp.
2012.09.30 22:22:04 '1110438': authorized on MetaQuotes-Demo through Access Point Europe
2012.09.30 22:22:01 '1110438': connection to MetaQuotes-Demo lost
2012.09.30 22:03:56 '1110438': scanning network finished
2012.09.30 22:03:53 '1110438': scanning network for access points
2012.09.30 22:03:51 '1110438': terminal synchronized with MetaQuotes Software Corp.
2012.09.30 22:03:51 '1110438': authorized on MetaQuotes-Demo
2012.09.30 22:03:51 expert Quant (EURUSD,H1) loaded successfully
2012.09.30 22:03:49 launched with C:\Champ\1110438\start.ini
2012.09.30 22:03:49 MetaTrader 5 x64 build 695 started (MetaQuotes Software Corp.)

Rashid Umarov
Admin
12054
Rashid Umarov  

Rosh:

What do you mean? If your EA is compliled as Quant.ex5 what do you expect to see in your terminal Journal? Which EA name should be typed there?

If you say about the Expert log (see picture below), it helps you to find out where is you should search potential error (in which file). It is similar to use Predefined Macro Substitutions i.e __FILE__ and __LINE__


Joaquin Poudereux
489
Joaquin Poudereux  
Rosh:

Have you launched your EA without history on chart from the command line as it descrubed in the news One Month Left Before Registration Deadline ?


Thanks for your anwer Rosh.

Of course, when I read this article, I checked what it said. That's how I noted that my ea was going to fail in the contest, I had one error telling that the emas couldn't be calculated because there was no histories. Pretty straightforward.

Your explanation of the name of the ea in clear, well, sounds ok to me. Strange, but possible.

But what it's really unacceptable is that this restriction of having to synchronize the histories wasn't in the rules. AND the fact, once again, that my EA works in the backtests perfectly fine, and is also tested thoroughly in demo accounts in forward tests, and that it doesn't work in the ATC.

Well, at least there's been some advance: now in the rules the restriction of time is specified -see here https://www.mql5.com/en/forum/2163

Also, one month again an article regarding synchronization of histories was published. Thanks again, Metaquotes!

But, would it be too much asking that the ATC platform's behaviour were like our desktop's platform behaviour?

I don't know if I will try another year of ATC... I've had too much disappointments for now.


Daniel Lewis
80704
Daniel Lewis  

I see Metaquotes changed the way their demo servers executed orders AFTER the EA submission deadline (Sept. 21).  All participants were given demo accounts that supposedly mimiced the way the contest servers would work.  Prior to Sept. 21st on the demo accounts, if you had an accumulated position size greater than 5.0 lots (and <= 15.0 lot max) and you had placed a server-side SL and/or TP on the position, it would close that position in one execution.

 Closing greater than 5.0 lots using server-side SL/TP in one deal

Starting the following week, AFTER THE DEADLINE, the demo server started operating differently. If the position size was greater than 5.0, still using a server-side SL/TP on the position, it "scaled out" of the position in increments of 5.0 lots.

 Now scaling out of positions larger than 5.0 lots

As  a result of this change in execution behavior, the EA I submitted (currently near last place after losing first trade) will now start submitting orders it shouldn't and generate (a possibly large number of) invalid S/L errors which could lead to dsiqualification.  It's already lost an additional $183.20 because of this change in behavior.  The EA would have never passed the automated screening if their demo server operated this way BEFORE the deadline, I could have easily changed the code.

 

Heinz Traub
314
Heinz Traub  
yokinfx:

This is the third consecutive year I try to participate in the ATC contest. This year my EA passed the tests, as in previous years.

2 days before deadline I read this post from MetaQuotes:

https://championship.mql5.com/2012/en/news/159

Which explains perfectly what happened to my EA in ATC 2011: https://championship.mql5.com/2011/en/users/yokinfx

I checked my EA for this year's contest, and it happened again!! I had my EA ready since several weeks ago, and now in less than 2 days had to modify its code to make it synchronize correctly the histories!!

Hi, i followed the whole issue and read all links.

If possible, can you post your lines related to data synchronization to see if the changes you made are correct and check if the error is directly related to data sync? thanks.

Joaquin Poudereux
489
Joaquin Poudereux  
TripleHeinz:

Hi, i followed the whole issue and read all links.

If possible, can you post your lines related to data synchronization to see if the changes you made are correct and check if the error is directly related to data sync? thanks.

Hi,

thank you so much for your interest.

The error is not directly related to data sync, but indirectly. The logic I added for data synchronization does not seem to work correctly. I wrote something similar to this

   while (CheckLoadHistory(simbolo_0,PERIOD_H1, StartDate) < 0)  {
      Print("Loading ",simbolo_0," history failed.");
      CheckLoadHistory(simbolo_0,PERIOD_H1, StartDate);

The function CheckLoadHistory is the one I found in https://www.mql5.com/en/docs/series/timeseries_access#synchronized

In this step it doesn't seem to fail. After this step, I create instances of objects for each symbol, which I reference several times in the program. This is how I do this:

//...
ArraySimbolos[0].emaPeriod    = emaPeriod_0;
   ema_handle_0  = iMA(simbolo_0,0,emaPeriod_0,0,MODE_SMMA,PRICE_CLOSE);
   ArraySimbolos[0].ema_handle   = ema_handle_0;
//...

I store all the variables I need for all the symbols in this public struct, ArraySimbolos.

Then, I create the object and initialize it:

//...
miListaSimbolos = new ListaSimbolos;
//...

ListaSimbolos::ListaSimbolos(void) {
   NodoSimbolo *simbolo_aux = new NodoSimbolo;
   for (int i=0; i<ArraySize(ArraySimbolos); i++){
      simbolo_actual = new NodoSimbolo;
      if (i == 0) { simbolo_aux = simbolo_actual; 
                    first = simbolo_actual; 
                    this.setNodoSiguiente(simbolo_actual); 
                    this.setNodoAnterior(simbolo_actual); 
      }
      if (i > 0) {  simbolo_aux.setNodoSiguiente(simbolo_actual);
                    this.setNodoAnterior(simbolo_aux);
                    simbolo_aux = simbolo_actual;
                    this.setNodoSiguiente(simbolo_actual);
      }
      if (i == ArraySize(ArraySimbolos)-1) { last = simbolo_actual; this.setNodoSiguiente(this.first); }
      simbolo_actual.Init(ArraySimbolos[i].symbol,ArraySimbolos[i].actualLot,ArraySimbolos[i].pips_TP,ArraySimbolos[i].pips_SL,
                          ArraySimbolos[i].cierre_pips, ArraySimbolos[i].multiplicador,ArraySimbolos[i].mult_cierre,
                          ArraySimbolos[i].emaPeriod, ArraySimbolos[i].ordenDoble);
   }
}

miListaSimbolos is a list of structs that contain all the data each symbol needs to work: its handle of the ema, its pips for sl and tp, etc. 

And this is the line of the failing code:

//...
NodoSimbolo *simb_actual;
   NodoPosSimbolo *pos_simb_actual;
     
   HistorySelect(0,TimeCurrent());
   int ticket = (int)(HistoryDealGetTicket(HistoryDealsTotal()-1));
   simb_actual = miListaSimbolos.getSimbolo(HistoryDealGetString(ticket,DEAL_SYMBOL));
   pos_simb_actual = miListaPosSimbolos.getSimbolo(HistoryDealGetString(ticket,DEAL_SYMBOL));
   
   double mi_multiplicador = simb_actual.getMultiplicador();  // <= This is the line of the error
   
   if (simb_actual == NULL || pos_simb_actual == NULL) return;
//...

As you can see, this error is very stupid, because if only I had written that line after the checking of those pointers to NULL, it wouldn't have failed. I have an error in my code, yes.  Why did it? I still don't understand it well. But I think that due to the fact that the EA doesn't have the histories in the moment of initialization, it doesn't assign the values correctly to the list of symbols, so what I actually have is a list of objects pointing to NULL. But this error has only emerged in ATC's platform.

If I had got this error in my platform, I could have fixed it.

Thanks again for your support TripleHeinz, but now it doesn't matter, what I can do now is fixing it. What would be wonderful is that ATC's platform behaviour were like our desktop's platforms behaviour, wouldn't it?

Just to reassure that this EA works, here you have the last testing report that the ATC 2012 did to the EA.


Appart from this big disappointment I've had, MT5 is incredibly powerful, and I consider MetaQuotes as a great company with a lot of professional people working in it.

Documentation on MQL5: Timeseries and Indicators Access / Organizing Data Access
Documentation on MQL5: Timeseries and Indicators Access / Organizing Data Access
  • www.mql5.com
Timeseries and Indicators Access / Organizing Data Access - Documentation on MQL5
Files:
report.zip 124 kb
Slava
Moderator
6925
Slava  

"Play simple melody" (c) Bing Crosby

Be easier. Just ask history and return without checking. Next ticks just check asked history. After 3rd tick all the asked history is downloaded. Be easier.

Joaquin Poudereux
489
Joaquin Poudereux  
stringo:

"Play simple melody" (c) Bing Crosby

Be easier. Just ask history and return without checking. Next ticks just check asked history. After 3rd tick all the asked history is downloaded. Be easier.

I guess you're right stringo.

That's the lesson I learn from all this...

Appart from this EA which I plan to use in real accounts :-)


''When life gives you lemons, make lemonade.''

Documentation on MQL5: Standard Constants, Enumerations and Structures / Environment State / Account Properties
Documentation on MQL5: Standard Constants, Enumerations and Structures / Environment State / Account Properties
  • www.mql5.com
Standard Constants, Enumerations and Structures / Environment State / Account Properties - Documentation on MQL5
Slava
Moderator
6925
Slava  
yokinfx:

''When life gives you lemons, make lemonade.''

Brilliant!
12
To add comments, please log in or register