I have been dabbling in this and it is pretty interesting. It is a huge time sink by the way. Also, you are playing the odds and you need a certain amount of cash or it will be gone before you get anywhere. If you end up trading frequently ("pattern day trading") you will be required to keep a higher balance in your account, BTW.
You might start with ninjatrader, which you can get for free. They can connect to yahoo for free price quotes (daily only), and also to some brokers for real time quotes during the day, if you have an account (I use TDAmeritrade and have been pretty happy with it).
ninjatrader has a (wacky) programming language and you can code up the conditions for buying and selling. The really neat thing is that you can run your "strategy" against historical data to see how it would have worked, and tweak it, etc.
Overall it is really painful to work with (if you are a programmer). But it does allow you to learn a lot without spending or risking any money until you think you are ready.
I believe TDAmeritrade has some kind of API you can call directly, but you have to contact them about it. Another one that I have looked at is Interactive Brokers. I haven't used them but I think they are well regarded. They are really aiming at professionals ("industrial" vs. "retail"). Possibly more what you're looking for, since they have a download page.
I would hold my nose and spend some time with ninjatrader (or something like it) just to see what's involved. You can code up your strategy and see on a chart where it would have you buy and sell, and how much you would gain or lose.
It's really pretty tricky and you should have some feel for what works and what doesn't (and when it works and when it doesn't) before you go all in.