You are off to a good start! Keep working on it. One thing to consider would be to accept a separate data feed.
IB do not provide tick data; their data is a delayed, bursty, VWAP. Tick data must be bought 3rd party, from a provider like IQ Feed.
http://www.iqfeed.net/
Perhaps try and integrate...