Any way for set a initial population in genetic algorithm?

Back to topics list To post a new topic, please log in or register
avatar
47
VabRus 2015.09.28 19:16
 

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;

 }

 
avatar
13009
WHRoeder 2015.09.28 19:54 #
 
The initial population is created from your external variable ranges.
avatar
47
VabRus 2015.09.28 20:23 #
 
WHRoeder:
The initial population is created from your external variable ranges.
No, the value is random between external variable ranges.
Back to topics list  

To add comments, please log in or register