I haven't read any of the books referenced earlier in this thread, but I am quite happy with this one:
Amazon.com: Trading Systems That Work: Building and Evaluating Effective Trading Systems (9780071359801): Thomas Stridsman: Books (
It goes pretty deep into how you should think when constructing (and evaluating) the nuts and bolts of a trading system. There are some example systems developed and scrutinized, not giving you something ready to plug in and play with, but to make you aware of different characteristics and their effect on performance.
Some example code is given for TradeStation, but it doesn't really matter if you're using TS or not, just skip the code to digest the results in that case...