Why does the remaining optimization time increase?

 

Can anyone give me hints what might be the reasons for a continously increasing optimization time?

When the optimization starts, I see 6 hours. After 6 hours I see 36 hours, etc...


Thank you very much!

 

I guess that the execution  time of the passes are increasing compared to the beginning.

Check your code with the profiler of the editor (Debug => Profiling).

Or because the optimizer couldn't find a clear path to increase the target value and thinks it need more passes to reach the stop criterion.

 
Please don't double post - it'll be deleted.
 
Carl Schreiber #:

I guess that the execution  time of the passes are increasing compared to the beginning.

Check your code with the profiler of the editor (Debug => Profiling).

Or because the optimizer couldn't find a clear path to increase the target value and thinks it need more passes to reach the stop criterion.

Thank you very much!


As of 1) The profiler looks ok. The main entry on Timer (checking if we have a new bar) is distributed over many methods. Or do I miss something from the profiler result?

   


as of 2) The planned number of iterations remains const around 10,000. It can however be, that the metric I use is somewhat non-linear but a similar situation comes with "max Balance" metric. 
However, there is a situation indicating that the optimization framework within MT5 might struggle. For hours this state remains active:



I have the possibility to log the processing results into a log file.


Any ideas what I might closer look at to get more information?


Thanks again!

PS Sorry for the double post.

 
btw, the profiler does not show any memory consumption??
 

" btw, the profiler does not show any memory consumption?"

No, but the terminal (F2) does, its the Task-manager of the Terminal, and the Task-Manager of Windows as well.

And have a look at your hard disk if the ram is full the pc starts to swap ...

Try to get rid of graphics as each graphic element needs to be moved on the chart with every new bar.

 

The function OnTester() is called at the end of a pass there you can save some data of the pass preferably on a csv file.

Every optimization has not only 1 stop criterion like the ex ante calculated no. of passes, e.g. missing improvements...

BTW here is a list of all functions with sort explanation for a kind of keyword search and if you place the cursor in the editor on OnTester press F1 so see the reference in many cases with examples (ready to copy, paste and amend).

I see that you are using fractals - serach for fractal EA and you'll fin 6 pages of articles and 5 pages of CodeBase!

Bare in mind there is almost nothing that hay not been coded for MT4/5 yet.

 
Eugen Funk:

Can anyone give me hints what might be the reasons for a continously increasing optimization time?

When the optimization starts, I see 6 hours. After 6 hours I see 36 hours, etc...


Thank you very much!

Because for an unknown reason the Tester is unable to evaluate correctly the execution time of a pass.

Maybe it depends of your optimized parameters, with some set it takes longer than with others.

 

Thanks everyone for your comments.

I am about to investigate possible memory consuption sources. Since there is no tool to inspect it (thanks for F2 hint - it helps a little at least), I just check guess by guess.

What I am looking at right now is the momory consuption by the drawing elements. After deleting all of them, the consuption seems to got better. However, I still have a few to go. These are:


1. Structs

When a struct is created, when is it deleted?

Example:

struct MyStruct {
int num;
};

class MyClass {
public:
MyStruct nums[];
void fill();
};

void method(MyClass& cls)
{
MyStruct filtered;
for (int i=0; i<ArraySize(cls.nums); i++)
  { 
  if (cls[i].num>10)
    arrayPush(filtered); //my custom templated method to add elemnts to an array
  }
//now I free the filtered
ArrayFree(filtered);

}

From my understanding the array MyClass.nums is still full, however, the copies of the structs inside the filtered array are gone. Is that right?

Will all MyStructs be gone after ArrayFree(nums) inside MyClass is called?


2. Pointers

class MyClass {
... //same def as before
~MyClass(){
  ArrayFree(nums); 
  }
}

MyClass * cls = new MyClass();

delete cls;

Is cls really deleted? 


I appreciate every comment on the scenarios. Thanks again!