Test for optimal expert advisor settings.

 
Is there a script or other method for testing for the optimal EA settings for any EA?  In other words, some sort of program that does backtesting with one set of EA settings, then continues backtesting with a large list of alternate settings and generates a report at the end showing wich settings worked best?