Download MetaTrader 5

ParameterSetRange

To add comments, please log in or register
Ingvar Engelbrecht
4504
Ingvar Engelbrecht  

I have a set statement in 2 variations dpending on what "mode" I am running the EA

ParameterSetRange("ModFactorTP",false,0,0,0,0);            Alternative 1      //Do not optimize but set a value of "0"

ParameterSetRange("ModFactorTP",true,1,-0.4,0.2)          Alternative 2     //Optimize with these values


In the "standard" window where you can set optimizing paramaeters  ModFactorTP  has a "standard"  value of 2.0 

When running the optimizer and using alternative 1 I get the value 2.0 from the "standard input" instead of  "0" from the ParameterSetRange

Is the proper way to set alternative  1 like this instead:

      ParameterSetRange("ModFactorTP",true,0,0,0,0);        

if I just want a value set "0" set but no optimsation     

Not clear who takes precedence.  The old window or the ParameterSetRange

Alain Verleyen
Moderator
31604
Alain Verleyen  
ingvar_e:

I have a set statement in 2 variations dpending on what "mode" I am running the EA

ParameterSetRange("ModFactorTP",false,0,0,0,0);            Alternative 1      //Do not optimize but set a value of "0"

ParameterSetRange("ModFactorTP",true,1,-0.4,0.2)          Alternative 2     //Optimize with these values


In the "standard" window where you can set optimizing paramaeters  ModFactorTP  has a "standard"  value of 2.0 

When running the optimizer and using alternative 1 I get the value 2.0 from the "standard input" instead of  "0" from the ParameterSetRange

Is the proper way to set alternative  1 like this instead:

      ParameterSetRange("ModFactorTP",true,0,0,0,0);        

if I just want a value set "0" set but no optimsation     

Not clear who takes precedence.  The old window or the ParameterSetRange

I don't have experience with this function, however, from what I can read in the documentation, this function has priority to the "standard" window. So your way to set Alternative 1 seems correct to me.

I suggest you to check the returned value, and eventually print the GetLastError().

Ingvar Engelbrecht
4504
Ingvar Engelbrecht  
angevoyageur:

I don't have experience with this function, however, from what I can read in the documentation, this function has priority to the "standard" window. So your way to set Alternative 1 seems correct to me.

I suggest you to check the returned value, and eventually print the GetLastError().

  Seems impossible. Only way to override the value set on the input tab is to specify a range in ParameterSetRange, Trying to just set a value without a range simply does not work, it then takes the value from the input tab
Alain Verleyen
Moderator
31604
Alain Verleyen  
ingvar_e:
  Seems impossible. Only way to override the value set on the input tab is to specify a range in ParameterSetRange, Trying to just set a value without a range simply does not work, it then takes the value from the input tab
Seems like a bug then (did you check returned value ?).
Ingvar Engelbrecht
4504
Ingvar Engelbrecht  
angevoyageur:
Seems like a bug then (did you check returned value ?).

Yes, I checked it.  OK.

Made an entry on the Service Desk

Ingvar Engelbrecht
4504
Ingvar Engelbrecht  
No response from Service Desk :-(
To add comments, please log in or register