For example, say I want to optimize the period of a couple of moving averages:
#1 SMA (2,20,1) (Fast moving average Period 2-20)
#2 SMA (10, 50, 1) (Slow moving average Period 10-50)
There is a range of values that overlap between the two moving averages (10-20). However I do not want to run the iterations where the fast period is greater than the slow period.
Is there any way I can add a pre-condition; or instruct the optimizer from code to abort an interation and to skip to the next one.
if(FastPeriod > SlowPeriod) {
// Skip this Iteration
}
Comment