Disable Parameter based on Backtesting ?

 

Hi guys,i'm trying to find out how to optimize my robot with backtesting,but i have a problem.


i have 3 variables:

X

Y

Z


if i put X= FALSE,how can i disable Y and Z too ?

because he will do the step for these variables but how i set X to false,i will not use it.

there's a way to fix it ? if i put some variable False,he don't update the others ? to minimize the steps ?


Thanks !

 
Bilal Said: to minimize the steps ?
input bool X=FALSE;

#define Ydefault 0
input int  Y=Ydefault;

#define Zdefault 1.0
input double Z=Zdefault;

int OnInit(void){
   // Skip all non-default combinations of Y and Z when X is false
   if(!X && (Y != Ydefault || Z != Zdefault) ) return INIT_PARAMETERS_INCORRECT;
   :
   return INIT_SUCCEEDED;
}
 
whroeder1:

Thank you very much !!!!!!