is OnTester() working as described?

 

Currently I am running two optimizations (status: 3009/10 496 (888 624)) with the use of OnTester().

The Reference writes:

In the genetic optimization descending sorting is applied to results within one generation. 
I.e. from the point of view of the optimization criterion, the best results are those with 
largest values (for the Custom max optimization criterion values returned by the OnTester 
function are taken into account). In such a sorting, the worst values are positioned at 
the end and further thrown off and do not participate in the forming of the next generation.

So it maximizes the outcome.

But what I actually see is exactly the opposite:


This looks as if mainly not the highest values are used but the smallest are used to run the next backtest.

Due to the fact the prev. builts the values of TesterStatistics() were not available ("..not yet implemented") I wrote my own functions:

void MyTester(){ // called generally after orders were closed...
        maxBalance = MathMax(maxBalance,AccountBalance());
        maxDD = MathMax(maxDD,maxBalance - AccountBalance());
}
..
double OnTester()  {
   MyTester();
   double prf = maxBalance - iniBalance;
        if ( maxDD > 0.0001 )
                return(prf/maxDD);
        else if (prf > 0.0)
                return(100.0);
        else
                return(-100.0);
}

Is that what I see the intended result of the use of OnTester() or is this still not working even though I get no warning nor an error?

Gooly


 
It's a great new know OnTester is working.
 

I am working with OnTester(), and I think is working perfectly.

Only I am waiting for OnTesterInit, OnTesterDeInit and TesterStatistics.

 
VabRus:

I am working with OnTester(), and I think is working perfectly.

Only I am waiting for OnTesterInit, OnTesterDeInit and TesterStatistics.


yes b617 is working but the prev. 616 wasn't I guess.
 
gooly:

yes b617 is working but the prev. 616 wasn't I guess.

Yes I am using b617...