I'm trying to do calculations on live prices for two different contracts with IB Live data. ??
What I'm trying to do, this is a newbie problem, is:?
request mktdata for two different contracts (not a problem)?
THEN do calculations on those prices and from that result submit orders for both contracts.
When you request live data from IB, the (reqMktData) method sends data concurrently down through tickPrice. Where I'm stuck is how to get the data OUT of tickPrice to do a simple difference calculation against it.
(Yup, trying to setup a pair trader system for myself) ??
It seems like, once you reqMktData the live data in stuck in that thread. ?I've try everything I understand and think it may have to do with setting up a delegate or interface or event or listener to get the data out of the tickPrice thread and onto another thread to do calculations and order submit.?
Any help is greatly appreciated. ?I've been trying to figure this out of weeks with C# and now Java and I'm totally stuck. ? :(?
Thanks in Advance.
John D.