IB DDE Excel: is it now possible to automate trailing orders

Discussion in 'Interactive Brokers' started by allesim, Dec 10, 2001.

  1. bennyo

    bennyo Guest

    MB1708, download the new dll from IB and a new sample .xls file. They changed a lot. Now it works.

    Greetings
    Benny,
     
    #11     Dec 13, 2001
  2. booger

    booger

    I'm getting a runtime error retrieving futures quotes. my v. of Office is up to date, and equites works (though not well) any ideas for solving the futures probelm?

    thx
     
    #12     Dec 20, 2001
  3. rickty

    rickty

    IB has changed the server name from the account number to
    the username. For the demos it's "edemo" for equities and
    "cdemo" for commodities.

    Using some DDE (C++) software I've been able to "connect"
    to IB's ddl but I haven't figured out what strings to pass
    using "execute", "poke" or "request" commands. Any help
    here would be appreciated.

    Richard
     
    #13     Dec 24, 2001
  4. ajax_g

    ajax_g

    Could someone explain briefly what would be the best way to get involved in this kind of programming?

    should I start with DDE excel programming or with VC++ what is more convenient for a beginner like me. Or there is something else.

    My intention is to write some programs and have the IB data feed or other feeds be displayed the way I want them.

    I am sorry if this questions sound to naive but believe me I can't help it.

    Thanks and many wishes to everybody for the holidays.

    ajax
     
    #14     Dec 25, 2001
  5. In my opinion the best way would be to start in Excel with Visual Basic for Applications (VBA). Then learn how DDE works. And when you hit the limits of Excel to move on to either C++, C# or VB. VB will propbably be the easiest because at that time you are already familiar with VBA, which is a subset of VB. Depending on your existing programming experience it could be lengthy process though.

    Peter
     
    #15     Dec 26, 2001
  6. ajax_g

    ajax_g

    for sure it is a lengthy process.

    Thanks again.
     
    #16     Dec 26, 2001
  7. dlincke

    dlincke

    Just ran a few tests using the DDEML library in VC++. This is fairly easy and straightforward to set up. However, IB's DDE Server seems to support only advise loop transactions even for order submission. XTYP_EXECUTE and XTYP_REQUEST don't work; the former fails with error code on the call to DdeClientTransaction() while the latter is indicated to work based on return values but in fact doesn't do anything. So you can't do synchronous transactions and have to specify a callback function. But if you're not interested in any data the DDE server may pass back for the ORD topic you can make the callback function a no-op and send an XTYP_ADVSTOP right after order submission with XTYP_ADVSTART.

    Dave
     
    #17     Dec 26, 2001
  8. jwcrim

    jwcrim

    I have been having a problem with the DDE link as follows:

    After having operated successfully with edemo and the tws.xls during the first day, I have problems with it the following day. The problem seems to be due to the tws JAVA applet ignoring all orders because it thinks they are duplicates.

    The directory "IBJts" contains a log.txt file that logs the applet's activity. When it ignores an order it logs the line:

    "JTS-Dde Monitor: Ignoring possible dup order with id id6503100" (Of course the id number varies)

    If (before I run the IB applet) I delete the entire IBJts directory and let the applet re-establish it, everything works fine again.

    I had a similar situation with my actual account. Both the tws.xls and the ddedll.dll are up to date (12/27 and 12/26).

    I'm using Windows 2000. Has anyone run into this?
     
    #18     Dec 28, 2001
  9. dlincke

    dlincke

    Are you sure you are not reusing IDs? TWS ignores any transactions with IDs it has seen before in the same DDE conversation.
     
    #19     Dec 28, 2001
  10. jwcrim

    jwcrim

    The id's are generated within tws.xls by multiplying the Time number by 10^7 and adding a sequential order count that starts at zero each time you restart the tws.xls program.

    The formulas in the cells seem to reflect that number correctly. The log error message...

    "JTS-Dde Monitor: Ignoring possible dup order with id id6503100"

    ... seems to indicate the id is getting there ok. And since even the first order of the day is ignored (Each day I use the fresh "original" tws.xls copy with no previous order formulas remaining.) it's hard to see how a duplicate is found and since the id changes properly with each order it's hard to see how all orders would be duplicates.

    Also when you restart the next day, I assume that it would be a new dde conversation.

    I also find this effect: If you use an id number that is higher than any id you used since the "IBJts" directory was last deleted, it accepts the order.

     
    #20     Dec 28, 2001