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().
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().
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
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