MT5 terminal updated today and the "Optimisation" window does not show up during the test - page 22

 
Aleksey Vyazmikin:

The point is that INIT_PARAMETERS_INCORRECT is often used to narrow down the search area by excluding illogical/unnecessary values, which significantly speeds up optimization when using a full enumeration. If INIT_PARAMETERS_INCORRECT didn't exist, genetics would just run into unnecessary variants and fiddle with them, so not excluding variable values is not an option. So that's what I'm asking, how do you suggest, as a professional, to solve this problem without too much effort. To enumerate all correct variables manually, for enumeration without gaps and knowingly exclude INIT_PARAMETERS_INCORRECT values is not an option - very long. Using smart counters is not for everyone and it may also harm genetics.

So what's left, to pass all parameters on 1 day and write their correct values to code, and thus select them for genetics?

Read my explanations above.

Your picture of the world is incompatible with the genetic algorithm. Kill a quarter of the population by denial - genetics will still survive, even at a loss. Kill 98% of the population - that's the end of evolution. Regardless of your wishes or preferred modus operandi.

Read the materials I linked to above.

I'm done with the enlightenment, sorry. The continuation of the INIT_PARAMETERS_INCORRECT thread is closed, all comments will be deleted.

 
void collectNecessaryDataOnTick()
{
   //--- считать последние цены на тике
   SymbolInfoTick(Symbol(),last_tick);
   
   ArrayFree(buf_CCI);
   
   if(CopyBuffer(handle_CCI,0,0,bars_4_tr_cur,buf_CCI) < 0 )               // копируем данные из индикаторного массива в статический массив buf_CCI для дальнейшей работы с ними
   {                                                                       // если есть ошибки
      Comment("Не удалось скопировать данные из индикаторного буфера");    // то выводим сообщение
      return;                                                              // и выходим из функции
   }
   bars_4_tr_cur  = 10;
   
   return;
}

Before today's update, everything was working. Now there is an error message.

 
Сергей Таболин:

Before today's update, everything was working. Now there's an error message.

What value does GetLastError() return?

What is the value of variable bars_4_tr_cur before calling CopyBuffer?

How many bars in time series, on which the handle_CCI indicator is counted?

 
Slava:

What value does GetLastError() return?

What is the value of the variable bars_4_tr_cur before calling CopyBuffer?

How many bars in the timeseries on which the handle_CCI indicator is counted?

variable = 33

М15

   ResetLastError();
   if(CopyBuffer(handle_CCI,0,0,33,buf_CCI) < 0 )               // копируем данные из индикаторного массива в статический массив buf_CCI для дальнейшей работы с ними
   {                                                                       // если есть ошибки
      Comment("Не удалось скопировать данные из индикаторного буфера");    // то выводим сообщение об ошибке
      Print(GetLastError());
      return;                                                              // и выходим из функции
   }

4003 -Erroneous parameter when calling a system function

 
Сергей Таболин:

variable = 33

М15

4003 -Erroneous parameter when calling a system function

Next question. Do I understand correctly that you are taking data from CCI indicator?

Please tell me the parameters with which you created this indicator.

 
Slava:

Next question. Do I understand correctly that you are taking data from CCI indicator?

Please tell me the parameters with which you created this indicator.

//--- активируем хендл индикатора CCI
   handle_CCI = iCCI(Symbol(),0,14,PRICE_TYPICAL);
   if(handle_CCI==INVALID_HANDLE)                        // проверяем наличие хендла индикатора
   {
      Comment("Не удалось получить хендл индикатора");   // если хендл не получен, то выводим сообщение об ошибке
      return(-1);                                        // завершаем работу с ошибкой
   }
   ArraySetAsSeries(buf_CCI,true);                       // устанавливаем индексацию для массива buf_CCI как в таймсерии
 
Сергей Таболин:

variable = 33

М15

4003 -Invalid parameter when calling a system function

Exactly 33? Is this a direct call using a direct value of 33 returning error 4003?

Check again

 
Slava:

Exactly 33? Is it a given direct call using the direct value of 33 that returns error 4003?

Check again

int OnInit()
{
............
//--- количество баров для определения трендов CCI
   bars_4_tr_cur  = 33;
............
//+--------
   return(INIT_SUCCEEDED);
}

Again. Before the update the EA worked fine on demo accounts of 3 brokers.

I even tried to replace the indicator from an earlier version. It still yells.

 

I've got it figured out.

The error was in reading the saved parameters file.

It was:

      if(filehandle != INVALID_HANDLE)

After changing it, it worked.

      if(FileIsExist(filename,FILE_COMMON) && filehandle != INVALID_HANDLE)
 
Сергей Таболин:

Let me repeat. Before the update the EA worked fine on demo accounts of 3 brokers.

I even tried to replace the indicator from an earlier version. It swears and that's it.

Please run this EA:

I purposely set it to receive data from iCCI indicator from bars 0 to 33 in a loop not every tick.

Files:
iCCI.mq5  11 kb