Optimisation in the Strategy Tester - page 18

 
Renat:

It only makes sense to use genetics if the number of passes is well over 10000. In your case, there are only 817 passes and they need to be run in a full search mode.

Genetics operates by modelling gene sequences to produce efficient individuals. This requires a certain number of populations, usually at least 10,000 passes.

Testing is not finished. It is in progress. However, in all three pictures there is still an imbalance in the number of passes. This imbalance was not formed immediately, but since when (number of passes) I can't say exactly.
 
ForexMoneyMaker:
Testing is not finished. It is in progress. However, in all three pictures there is still an imbalance in the number of passes. This imbalance did not form immediately, but from exactly when (number of passes) I cannot say.

Yes, I misunderstood the question.

We are working on it now. Perhaps it is related to skipping "useless" results.

 
Renat:

Yes, I got the question wrong.

We are sorting it out now. Perhaps it has to do with skipping "useless" results.

Here, by the way, you also bring another question to my mind:

If optimizer, like in my case, finds it hard to find a solution (see that the result is mostly zero and optimization is very slow despite 4 cores and 20 external agents), should I go to full brute force optimization instead of genetic algorithm?

Генетические алгоритмы - это просто!
Генетические алгоритмы - это просто!
  • 2010.05.25
  • Andrey Dik
  • www.mql5.com
В статье автор расскажет об эволюционных вычислениях с использованием генетического алгоритма собственной реализации. Будет показано на примерах функционирование алгоритма, даны практические рекомендации по его использованию.
 
ForexMoneyMaker:

But if the optimizer, perhaps as in my case, has difficulty finding a solution (you can see that the result is basically zero and optimization is very slow despite 4 cores and 20 external agents), should we move optimization to full brute force instead of a genetic algorithm?

Roughly speaking, genetics allows to get out of almost any local pits by randomly packing parameters into genes.

Generally speaking, if genetics (you can run 2-3 retests) didn't find anything, then there's nothing for brute force to do there either.

 
ForexMoneyMaker:

Hello moderator!

I have a question: why do all three pictures attached here show a different number of optimizer passes? What is the reason?

According to the first picture the number of passes should be 817. However, on the second and third picture their number is much lower.

You are asking questions that have been discussed many times. And the answers are in the help. I am not a moderator, but I will answer.

The graph shows all results except those marked in red. Runs with a critical error are marked in red.

Only unique results are placed in the results tab. For consecutive runs, all results are unique. With genetics, a large number of parameter sets are repeated, i.e. they are not unique. The result is already in the result cache - this parameter set is not sent for testing, the result is plotted, but not in the results list.

 
stringo:

I'm not a moderator, but I'll answer.

 
Renat:
stringo:

You are asking questions that have been discussed many times. And the answers to which are in the reference. I am not a moderator, but I will answer.

The graph shows all results except those marked in red. Runs with a critical error are marked in red.

Only unique results are placed in the results tab. For consecutive runs, all results are unique. With genetics, a large number of parameter sets are repeated, i.e. they are not unique. The result is already in the result cache - this parameter set is not sent for testing, the result is plotted but not in the results list.

Okay. Thank you. It's all clear.
 
ForexMoneyMaker:
(chuckles): Okay. Thank you. Everything is clear.
In the tester's log in the context menu check "Full optimization logs". Then read the log - it shows which agent gave which job, which agent got which result, which result was found in the resulting cache, which result was found in the file cache. Which runs ended with a critical error (and what error). It can be fascinating reading
Документация по MQL5: Программы MQL5 / Ошибки выполнения
Документация по MQL5: Программы MQL5 / Ошибки выполнения
  • www.mql5.com
Программы MQL5 / Ошибки выполнения - Документация по MQL5
 

Hello, Moderator!

I have a new question concerning the optimization of an EA using the OnTester() function in which the appropriate condition has been written. The optimization was performed using the genetic algorithm on build 496.

The optimizer working results are shown in the pictures below:

In order to make sure the parameters obtained during optimization give appropriate results, we have tested the Expert Advisor with the corresponding parameters obtained for the last row in each table but on the updated version of the 519th build (unfortunately, this was not done on 496).

There are three questions:

1. Why does the optimization chart show a negative value, if by OnTester(), the result is either equal to zero or greater than zero?

2. Why do we see two points above zero on the optimization graph (value equal to 0.51), while there is only one in the table?

3. What can be the reason that the results of two tests did not coincide with those of the optimization after testing on build 519? (in the first case, the Expert Advisor stopped instead of profit 745 as a result of deposit draining to the level of insufficient funds to open positions, and in the second case, the result received 7903030 instead of profit 83064)

 
ForexMoneyMaker:

There are three questions:

1. Why is there a negative value on the optimization graph, if by OnTester(), the result is either equal to zero or greater than zero?

2. Why do we see two points above zero on the optimization graph (value equal to 0.51), while there is only one in the table?

3. What can be the reason that the results of two tests did not coincide with those of the optimization after testing on build 519? (In the first case, instead of profit 745, the Expert Advisor stopped as a result of deposit draining to the level of insufficient funds to open positions, and in the second case, instead of a profit of 83064, the result was 79030)


I am not a moderator, but I will try to answer.

1. You have exactly 0 result on your chart, it's just that 0 is not shown on the scale.

2. The genetic algorithm generates individuals with the same set of parameters, for them the results are taken from the cache, without a real run. So, the graph displays the results of all runs, including duplicates, while duplicate runs are not entered in the results table (but the log displays a message that the result is taken from the cache).

3. In a single run tester completes the test if a stop-out level is reached, while the optimizer skips such situations without analysis. Probably, testers can't determine the fact of stop-out on their own, and the tester does it. And the balance may return to the positive area. I have observed such cases too.

4. The last case, I think, is either due to terminal update or history update.

Reason: