You can't do it easily in backtester, I think there is some research code floating around here that will let you do it... But even if you could you shouldn't do that. Lets say you backtest over 10 years and find the perfect settings that give you the most profit with no drawdown. There is absolutely no guarantee that those parameters will still work in the future, What worked yesterday could be the worst tomorow. That's called overfitting, a form of bias that will cause your backtests to lie to you.
I usually just set my parameters to something that works fairly well in a wide range, ie if a parameter is good at 20 and bad at 19 or 21 I don't use it, if it's good from 15-25 I will probably set it to 20 and not touch it again. The exception to this rule is if a parameter is based on machine learning or some other dynamic selection method.