Conditional Optimisation Parameters - page 3

 
cyberdeth #:

The 500 number was an arbitrary number i've seen when running optimisations, but this forum references that too many invalid parameters cause failures  New Version of MetaTrader 5 Platform build 1860: Functions for Working with Bars in MQL5 and Improvements in the Strategy Tester - General Discussion - MQL5 Algo Traders Forum - Page 14. WRT the ParameterSetRange, i have tried that and you will see that i have referenced it in the start of my thread. It doesn't quite work because the passes are generated onTestInit, unless my understanding is incorrect and that it generates it on every pass. but i could not get the behaviour i wanted. maybe i'll revisit it.

That is only about the "faster genetic optimisations", not the "slower complete optimisations".

 
cyberdeth #:

spoke too soon. it doesn't work as intended.

But I'm still getting:

instead of 0 where the signal is false. Furthermore when i start the genetic optimisation, in the journal I can only see the following being printed once.

What I'm expecting is that the input param is calculated and set per pass. It would've been really helpful to have a method that's callable by the optimiser before a test, similar OnTester. Some like OnBeforeTester where you are able to set the input parameters.

The OnTesterInit() only runs once at the start of the optimisations, not on every pass.
 
Fabio Cavalloni # :

I always approached similar scenarios using INIT_PARAMETERS_INCORRECT inside the OnInit and nothing else.


In this case, when you have disabled indicator A, it will run only the first pass of your optimization, same for indicator B. But it's very similar of what Alain already suggested.

It's not similar.

You will get a lot of wrong passes and it will break the Genetic Algorithm.

Forum on trading, automated trading systems and testing of trading strategies

New MetaTrader 5 platform version build 1860: Functions for working with bars in MQL5 and improvements in the strategy tester

Renat Fatkhullin , 2018.06.25 11:47

Are you going to tailor the optimizer's behavior to suit yourself and your particular case? Not to mention that you are killingthe genetic algorithm with your INIT_PARAMETERS_INCORRECT.

I don't see any point in discussing this issue.


With slow algo, it will be similar, but still not the same (your approach will take more time, though maybe not that much, I didn't check).

Using INIT_PARAMETERS_INCORRECT should be avoided as much as possible when using the GA.

Forum on trading, automated trading systems and testing of trading strategies

Today the MT5 terminal was updated and the "Optimization" window is not shown during testing

Renat Fatkhullin , 2018.07.02 23:18

I recommend for genetics:

  1. Read about the mechanics of genetic enumeration
  2. Choose a smooth enough objective function to allow the algorithm to see improvements in generations and move forward. Don't trick the algorithm with false results. The genetic algorithm is a rather subtle and sensitive thing.
  3. Don't kill more than a quarter of the population per pass via INIT_PARAMETERS_INCORRECT (use in critical cases, or better yet, don't use it at all). A quarter is a rough estimate and is in no way a recommendation or permission to do so.
  4. The parameters being iterated over must be working on the entire interval. Do not make deliberate holes in the parameters being iterated over, so as not to generate INIT_PARAMETERS_INCORRECT. You are doing this solely for your own convenience, and are not thinking about the iteration process.
Yes, you need to rebuild the logic of the parameters to suit the enumeration process and the search method used, and not to suit your convenience.

 
cyberdeth #:

spoke too soon. it doesn't work as intended.

But I'm still getting:

instead of 0 where the signal is false. Furthermore when i start the genetic optimisation, in the journal I can only see the following being printed once.

What I'm expecting is that the input param is calculated and set per pass. It would've been really helpful to have a method that's callable by the optimiser before a test, similar OnTester. Some like OnBeforeTester where you are able to set the input parameters.

Get rid of your bool !!!

You can't solve your problem with ParameterSetRange(), it's not a range issue.


 
I forgot to mention that I used that approach only with Slow complete optimizations.

Personally it's the only method I use. 

Even without using INIT_PARAMETERS_INCORRECT
I often found the genetic algorithm weird and randomly inconsistent, skipping passes that should be considered and vice versa.

If I want to skip some passes, I know exactly which I don't want, but I understand that most of people approaching optimizations have not much consciousness of what they are doing or looking for, or how a variable affect the operation of their EA.