I assume you've seen jcl's blog financial-hacker.com? There is plenty of source code available at that site. There is also some on my website - see link in my signature.