Some beginners apparently come up with this "brilliant" optimization idea - throw 5 adjustable-period indicators/averages and run optimize on SP500 (or EURUSD or whatever else) and voila... in a matter of minutes we got holy grail. If that does not work on first attempt they might throw a couple of new opt params in the mix.

If they try to trade this system the market will happily take their money away and quickly teach them what they did not learn earlier themselves - you simply can NOT throw more params into the mix without thinking.

You need to do your homework, you have to do the math not to place yourself in the overfitting hole.

Say you just use 3 optimization parameters. Each parameter ranging from 1 to 100. Optimizing for such three parameters means doing 100 * 100 * 100 optimization steps. That is 1 million. Now if your input (in-sample) data has say 100K bars (for EOD it would be almost 400 YEARS) it is too few data to be sure to avoid curve fitting.

You have got 10 time less data points (100K) than parameter combinations (1 million). That means high chances that optimization results will be curve-fitted.

That is why I always warn people against going wild with single-symbol optimization. It just takes very little params for the search space size to go beyond data set size of single symbol. Optimization on large portfolios uses more data points and is less prone to curve fitting.