Set input variable stop

 

Can I set the stop of one input variable Inp_Signal_TwoEMAwithITF_PeriodFastEMA to another Inp_Signal_TwoEMAwithITF_SlowFastEMA?(Inp_Signal_TwoEMAwithITF_PeriodFastEMA <= Inp_Signal_TwoEMAwithITF_SlowFastEMA)

 
What exactly would you like to do?
 
alexvd:
What exactly would you like to do?

 

 tester

I wanna to set the stop of Inp_Signal_TwoEMAwithITF_PeriodFastEMA to another variable Inp_Signal_TwoEMAwithITF_PeriodSlowEMA, instead of specific figures.

please advise. 

 

If I get the picture right you would like not to run optimization pass when value of Inp_Signal_TwoEMAwithITF_PeriodFastEMA is more then value of Inp_Signal_TwoEMAwithITF_PeriodSlowEMA.

You can add 'if' statement in OnInit function which returns non-zero result for the OnInit function. In this case optimization pass finishes with error.

if(Inp_Signal_TwoEMAwithITF_PeriodFastEMA>Inp_Signal_TwoEMAwithITF_PeriodSlowEMA)
     {
      printf("Value of Inp_Signal_TwoEMAwithITF_PeriodFastEMA (%d) musn't be more then Inp_Signal_TwoEMAwithITF_PeriodSlowEMA (%d)",
             Inp_Signal_TwoEMAwithITF_PeriodFastEMA,
             Inp_Signal_TwoEMAwithITF_PeriodSlowEMA);
      return(1);
     }
 
alexvd:

If I get the picture right you would like not to run optimization pass when value of Inp_Signal_TwoEMAwithITF_PeriodFastEMA is more then value of Inp_Signal_TwoEMAwithITF_PeriodSlowEMA.

You can add 'if' statement in OnInit function which returns non-zero result for the OnInit function. In this case optimization pass finishes with error.

alexvd, thank you so much.