software for backtesting and automated trading

I am looking for a good software tool that supports backtesting strategies and also allows automation. I plan to trade in stocks, options, and futures.

Tradestation seems to fit the bill but it is expensive and they don't even allow a demo account for trying it out. I would prefer something that is either free or has a one time cost instead of a monthly fee plan.

Any pointers and tidbits on your own experience about their pros and cons will be appreciated.

I'm partial to wealthlab, but they're owned by fidelity so you're locked into trading with them. However you can still do a lot of stuff on their web site for free, and they have a lot of decent systems available posted on their site and ready to be run.