Skip Optimization

 

What can I do to skip some of the parameters in strategy tester?

 

Example

Input A Start 0, Step 10, Stop 100

Input B Start 0, Step 10, Stop 100

 

If input B is more than input A then skip optimization. 

 

Anyone know how?

I'm currently using this code in my ontick()

if(input b > input A)  return;

optimization still run and return me 0, can I actually skip that? 

 
doshur:

Anyone know how?

I'm currently using this code in my ontick()

if(input b > input A)  return;

optimization still run and return me 0, can I actually skip that? 

Try to put your "if" statement in OnInit().
 
angevoyageur:
Try to put your "if" statement in OnInit().
And OnInit return value should be set to INIT_PARAMETERS_INCORRECT
 
stringo:
And OnInit return value should be set to INIT_PARAMETERS_INCORRECT
Thank you stringo for that clarification.
 
stringo:
And OnInit return value should be set to INIT_PARAMETERS_INCORRECT

Hi Thank you stringo 

can  you write sample code ? 

 
kourosh1347:

Hi Thank you stringo 

can  you write sample code ? 

It is not good to be lazy :-)

Place code like this in your OnInit() function:

if (input b > input A) return(INIT_PARAMETERS_INCORRECT);
 

Thanks a lot. This code sure save some time for my optimization.

:) 

 
doshur:

Thanks a lot. This code sure save some time for my optimization.

:) 

You are welcome
 

works but

2013.04.01 11:35:34 Core 8 pass 149 tested with error "Incorrect input parameters" in 16 ms

still took 16 ms?

Reason: