Any way for set a initial population in genetic algorithm?

 

Best regards 

 

I think is very important to set a initial population when we use the genetic algorithm like we could set in Matlab.

 

Only we must set external variables from code.

 

Like this:

 

int init()

  {

//----

     if(GlobalVariableCheck(initialPopulation) == false)

     {

        GlobalVariableSet(initialPopulation, 0.0);

        period = 184;  //not set 

        StartHour = 2; //not set

        EndHour = 8; //not set

        TPMin = 207; //not set

     } 

} 

 

or

 

void OnTesterInit() (not running in mql4)

{

         period = 184;

        StartHour = 2;

        EndHour = 8;

        TPMin = 207;

 }

 
 
The initial population is created from your external variable ranges.
 
WHRoeder:
The initial population is created from your external variable ranges.
No, the value is random between external variable ranges.
Reason: