You'll know when you are overoptimized when your results are inconsistent witht he opotimization period. In other words, tweaking a system for "top" results (assume that the way to evaluate a system has been decided) often results in poor results going forward. That's overoptimization. To avoid, take a long period of data (how long? depends on what period is being traded), divide into two, optimize the early half, check that results are similar using 2nd half data. Not too easy and you may decide that optimization is not the living end.