Any way to prevent unwanted input tests in optimizer?

 

If you're testing a system that takes both long and short positions, you are faced with the problem that the optimizer will test non-paired inputs for short and long trades. For example if I was trying to test SMA 20 through 60 with step 20, the optimizer will test 20, 40 and 60 MA for both long and short positions (which is usually what you want) but it will also test 20 for long positions in conjunction with 60 for short etc. (this is not generally desirable). The more steps you have, the more unwanted test you get (the number of steps squared if I'm not mistaken).

Short of running optimization for long and short positions separately, is there any way to get around this?