Increase genetic algoritm number of passes

 

Hi

In fast genetic optimization The default number of passes for many step is 10000.

One day I tested mql5 ea from market and I see it can increase number of passes more than 10000 passes(exp 30000).

Now I need get more accuracy in my optimization result. how I can change default number of passes?(please share code sample)

I appreciate your help.

 
SASAN Morady Sarju:

Hi

In fast genetic optimization The default number of passes for many step is 10000.

One day I tested mql5 ea from market and I see it can increase number of passes more than 10000 passes(exp 30000).

Now I need get more accuracy in my optimization result. how I can change default number of passes?(please share code sample)

I appreciate your help.


Easy....Strategy Tester / Optimization / Slow complete algorithm (all passes).

 
Miguel Angel Vico Alba:

Easy....Strategy Tester / Optimization / Slow complete algorithm (all passes).

Complete algorithm is good idea but its take long more then one week with my poor PC while I set ea step in minimum.

 
SASAN Morady Sarju:

Complete algorithm is good idea but its take long more then one week with my poor PC while I set ea step in minimum.


It is not possible through a code determine the number of passes.

You have two options, genetic algorithm (which I recommend) or make all the checks using all values.

Not exist a middle ground, nor is it possible to determine the number of passes, unless "play" with the number of variables until you find the number of passes to your liking and patience.

I do optimizations of up to 6 or 7 days and the results are worth the wait.

 
SASAN Morady Sarju:

Hi

In fast genetic optimization The default number of passes for many step is 10000.

One day I tested mql5 ea from market and I see it can increase number of passes more than 10000 passes(exp 30000).

Now I need get more accuracy in my optimization result. how I can change default number of passes?(please share code sample)

I appreciate your help.

Try a different approach!

Instead of optimizing e.g. a period for iMA from 10 .. 100 step 1

do the first optimization with period: 10 .. 100 step 10 => then search where you can find the best results!

E.g. 10, 20,30 are the three best of all 9 (10,..,100)! Now do the next optimization with 10..40 step 5 - (and so on).

Of course it can happen that you are skipping fantastic results e.g. at period=78 but:+

  1. the genetic optimization has the same problem: you'll get a local optimum, which might not be the global one.
  2. you should not look for best 'peaks' but for more or less 'flat hills' as this is more save against market changes!
 
Carl Schreiber:

Try a different approach!

Instead of optimizing e.g. a period for iMA from 10 .. 100 step 1

do the first optimization with period: 10 .. 100 step 10 => then search where you can find the best results!

E.g. 10, 20,30 are the three best of all 9 (10,..,100)! Now do the next optimization with 10..40 step 5 - (and so on).

Of course it can happen that you are skipping fantastic results e.g. at period=78 but:+

  1. the genetic optimization has the same problem: you'll get a local optimum, which might not be the global one.
  2. you should not look for best 'peaks' but for more or less 'flat hills' as this is more save against market changes!

+1

 
There is throttling occurring with the tester, as i will run a test a few times with same perimeters and it will read 27000 passes, only to then be throttled down to 8704 after multiple tests.

This makes one feel as though their efforts are being sabotaged. I also tested with just computer resources and it stills shows as 8704, meaning that one is not being throttled due to heavy server usage. I have checked the configuration files for the tester but do not see where amount of passes can be adjusted.

50,000 passes would be ideal, 8704 is unacceptable. The reality is that with the amount of possible combinations, the passes could reach several millions, and still continue going on indefinitely.

The expert tester is state of the art, so why create that and then throw a wrench into right after? With today's technology and cloud connections, increase the number of passes to 50,000 or more! (as aforementioned i can definitely confirm it is being throttled by Meta trader 5) :(
Distributed Computing in the MQL5 Cloud Network
Distributed Computing in the MQL5 Cloud Network
  • cloud.mql5.com
Today's computers spend most of their time idle and do not use all the features of their CPU. Now you can benefit from the spare power of your PC. You can sell your computer's CPU time to other members of our network community for a variety of tasks like optimizing Expert Advisors optimization or developing mathematical models. Join the MQL5...
 
SASAN Morady Sarju: In fast genetic optimization The default number of passes for many step is 10000.

There is no default. The 10K is the initial estimate. The estimate changes as the run progresses. There is nothing to change, but your code.

 
SASAN Morady Sarju:

Hi

In fast genetic optimization The default number of passes for many step is 10000.

One day I tested mql5 ea from market and I see it can increase number of passes more than 10000 passes(exp 30000).

Now I need get more accuracy in my optimization result. how I can change default number of passes?(please share code sample)

I appreciate your help.

Genetic Algorithm is a kind of logic used by many applications.


There is a good article here to understand how Genetic Algorithm works:

https://www.mql5.com/en/articles/55

Genetic Algorithms - It's Easy!
Genetic Algorithms - It's Easy!
  • www.mql5.com
Introduction Genetic algorithm ( GA ) refers to the heuristic algorithm ( EA ), which gives an acceptable solution to the problem in the majority of practically significant cases, but the correctness of the decisions has not been proven mathematically, and is used most often for problems, the analytical solution of which is very difficult or...
 
William Roeder:

There is no default. The 10K is the initial estimate. The estimate changes as the run progresses. There is nothing to change, but your code.

Precisely correct!