Please read the documentation on the return value for the OnInit() event handler, specifically the following ...
INIT_PARAMETERS_INCORRECT
Designed to denote an incorrect set of input parameters by a programmer. In the general optimization table, the result string with this return code is highlighted in red.
A test for such a set of EA inputs is not performed. The agent is ready to receive a new task.
When this value is received, the strategy tester does not pass this task to other agents for repeated execution.
- www.mql5.com
Please read the documentation on the return value for the OnInit() event handler, specifically the following ...
INIT_PARAMETERS_INCORRECT
Designed to denote an incorrect set of input parameters by a programmer. In the general optimization table, the result string with this return code is highlighted in red.
A test for such a set of EA inputs is not performed. The agent is ready to receive a new task.
When this value is received, the strategy tester does not pass this task to other agents for repeated execution.
thanks
An option for the Init-Method is something like this:
...
If (variable < minimum) variable = default;
...
yeah this is better. I tried return INIT_PARAMETERS_INCORRECT and it removes the EA from my template.. so this is not desired behaviour for me
To not be ignorant, there should be an print output like:
... if (variable < minimum) { variable = default; Print("variable x was to small, set it to default value", default); } ...
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
How do people usually validate their input values?
I was "cheating" doing things like using uint instead of int (to prevent negative values) however the compiler doesn't seem to like this much because later on when I compare unit to int variables it gives a "sign mismatch" warning.