I'm having an automated trading platform built for me and it'll tie into various brokerages. With that said, I'll mostly be trading options and the spreads can get big; so looking for some code on Github to help execute the best pricing. I was thinking of code that chases the mid point every 5 seconds and order flow, etc.... Does anyone know of any code that already exists for an efficient process? thanks
If you have to look for the code to do that simple task, don't touch any broker API, you are going to lose everything you have through errors and exceptions.
Yes, for limit orders. I hired someone to code this, but haven't looked through the APIs of the brokers I'm using.. maybe it already accounts for some type of limit execution that chases down the midpoint and best pricing..l not sure.. just getting ahead of the developer.
One way is to calculate the binominal (or trinominal) price in realtime and keep the order pinned at that price. But this does not garantee a fill. Myself I chose to use the stepping method. That is I place the order one tick below/above the ask/bid and step the order one tick until filled.