Skipping some input in strategy - page 2

 
Marco Montemari #:

I have read, but my case is different.
my input:
A,B,C,D,E
if C=0 I do not care of D ed E but at least once the combination should be calculated.
Example
1,1,1,1,1->ok calculate considerring all parmeters
1,1,0,1,1-> ok calculate because i need to have 1,1,0
1,1,0,1,2->as said c=0  and it has already calulcated for input 1,1,0 so skip this

1,1,0,8,4->as said c=0  and it has already calulcated for input 1,1,0 so skip this
1,2,0,1,2->ok calculate  because i need to have 1,2,0

input are in a range, there is not threshold like if time is > 10 pm return -1

Again, you have answered your own question. Do exactly how you describe it and return "INIT_PARAMETERS_INCORRECT" when you want it to skip.

For example, for C == 0, accept only the pass where both D and E are both 1, and reject/skip all other combinations of D and E, just as you have described it.

Your case is not different nor special in any way, and you have described it with no difficulty, so just implement it as that.

 

Yes it is my idea but something is missing:
can I get the min-max-step directly from the input instead having them hardcoded?
Thanks

 
Marco Montemari #: can I get the min-max-step directly from the input

That is what input variables are for.

 
William Roeder #:

That is what input variables are for.

Got it, thanks

 
Documentation on MQL5: Working with Optimization Results / ParameterGetRange
Documentation on MQL5: Working with Optimization Results / ParameterGetRange
  • www.mql5.com
ParameterGetRange - Working with Optimization Results - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5