Excel DDE + IB

Discussion in 'Automated Trading' started by travis, Jun 28, 2005.

  1. If you're not set on IB, check out the DDE links or automated trading with InstaQuote.
     
    #11     Jul 8, 2005
  2. francis1

    francis1 ET Sponsor

    trader_lon,

    DDE is not the same thing as RTD. IB does not offer a Excel RTD.

    Francis
     
    #12     Jul 8, 2005
  3. 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
     
    #13     Aug 8, 2005
  4. wizardx

    wizardx

    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.
     
    #14     Aug 9, 2005
  5. BKuerbs

    BKuerbs

    The TWS API has to be identical. You have to download and install the TWS API independently from the TWS.

    Hth

    Bernd Kuerbs
     
    #15     Aug 9, 2005
  6. 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!
     
    #16     Aug 9, 2005
  7. 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
     
    #17     Aug 12, 2005
  8. 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.
     
    #18     Aug 12, 2005
  9. newbunch

    newbunch

    But how do you use the Java API to get the data into Excel?
     
    #19     Aug 12, 2005
  10. 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.
     
    #20     Aug 12, 2005