I have been going nuts with this IB and VB problem past 2 hours so if anyone can help me out, I'd sincerely appreciate it. I had a VB project which works with IB in my PC. I copied everything onto my laptop and it stopped working. It would not even compile (when I press the play button in VB). It gave me a compile error. The TWs is identical so I am really at a loss. The error message is "Compile Error. Procedure declaration does not match description of event or procedure having the same name. " The offending routine is Private sub twscontrol_tickprice(byval id as ling, byval ticktype as long , byval price as double....) 'code to capture the ticks here end sub Any suggestions? Thanks
It may be because you did not register the tws control on your laptop visual basic. Go to Projects => Components and check TWS Activex Control Module.
The TWS API has to be identical. You have to download and install the TWS API independently from the TWS. Hth Bernd Kuerbs
Bernd Kuerbs It was the TWS API issue. Both TWS and API needs to be compatible. Thanks a lot! Saved me a lot of time. Appreciate it!
Hi. Y'all. I have a question about the best way to pull IB option quotes into Excel for my calculations. I have an XL sheet with 10 ticker symbols. I use active X to get a total of 7 symbols per symbol. (i.e. calls ReqMktQuote 7 times). It then writes the bid/offer to my Xl sheet, cancels the request, moves on to the next ticker, requests the 7 symbols for that ticker, etc. The problem is that sometimes it misses bids/ offers which screws up my calcs.IS it better to use DDE than Active X?Thanks
DDE is flawed - that's why MS came up with RTD. DDE has noe guarantees that data will get delivered - i.e if your Excel app is busy recalculating cells, then any ticks via DDE won't get delivered. DDE is at best dicy. The best interface to IB API seems to be the Java API where you can go in and get same datatypes as IB TWS, or even change datatypes if you want - i.e reprogram the API receiving end. I changed floats to the more efficient integer e.g.
Thanks for the suggestion. I could be way off on these but I think Active X is better than DDE in most cases especially when dealing with a lot of symbols. But if less than 10 symbols , DDe might do it better. I have it in active X currently and I am getting weird data into XL sheets.(i.e. 0 bids, options worth 10 cents coming in as $5,etc) I used to think it was the missed events during calculations but am still getting wierd data after turning worksheet calculate and updates to off during the data upload.