The error you are most likely to do is over fitting your trading idea until it works in exactly the environment you have tested it on, but nowhere else, specially if you have a program that only fulfills category one or two below.
There are programs out there that lets you:
Test and optimize your system on one item (stock/index/...) at a time. For example Superchart made by Omega Research is such a program.
Test but not easily optimize your system on many items (like all stocks in Sweden for example). For example Tradestation made by Omega Research is such a program.
Both optimize and test your system on many items. For example TAS (Technical analysis Scanner) made by Flexsoft is such a program.
Both optimize and test your system on many items, at the same time trade against a basket selection of all those items. For example Technifilter is such a program.
If you do an optimization that over fits your system, you might actually be close to optimizing your losses