Strategy tester optimisation with not independent parameters and ranges

 

Hi,


Quick question, if you try to run strategy tester, where your variables are not independent, i.e. the range of variable A depends on the value of variable B.

As such there is no reason to scan optimisation parameters beyond a certain point, while for other values of B, it would make sense.

So in extreme cases A = 1:0.1:15, and normally B = 100:10:1000, but actually A = B/100 : 0.01 : B/100+5

How do you set it in the inputs tab? Can you set it there? Is there any other way to set it (in some file)?

 

You can run the tester through command line.

So, you could write automation code (perhaps in Python) to invoke the tester (through command line) for each parameter set. It could be done.

Start here: https://www.mql5.com/en/forum/127577

And review the tester parameters here: https://www.metatrader5.com/en/terminal/help/start_advanced/start

(Search for the section called [Tester].)

 
pcdeni:

Hi,


Quick question, if you try to run strategy tester, where your variables are not independent, i.e. the range of variable A depends on the value of variable B.

As such there is no reason to scan optimisation parameters beyond a certain point, while for other values of B, it would make sense.

So in extreme cases A = 1:0.1:15, and normally B = 100:10:1000, but actually A = B/100 : 0.01 : B/100+5

How do you set it in the inputs tab? Can you set it there? Is there any other way to set it (in some file)?


Let's suppose to have 2 input, A and B

A:0->100

B:0->100
but B must be always lower than A


int OnInit()
  {

  
   if(B>=A)
     {
      Print("B must be lower than A");
      return(INIT_FAILED);
     }
 
pcdeni:

Hi,


Quick question, if you try to run strategy tester, where your variables are not independent, i.e. the range of variable A depends on the value of variable B.

As such there is no reason to scan optimisation parameters beyond a certain point, while for other values of B, it would make sense.

So in extreme cases A = 1:0.1:15, and normally B = 100:10:1000, but actually A = B/100 : 0.01 : B/100+5

How do you set it in the inputs tab? Can you set it there? Is there any other way to set it (in some file)?

You can use ParameterGetRange()/ParameterSetRange(). See documentation.
Reason: