IB DDE basic question

Discussion in 'Trading Software' started by MYDemaray, Aug 31, 2005.

  1. Sanjuro

    Sanjuro

    id = idn, where 'n' is some integer number. For orders, 'n' must always increase, even from session to session.

    I used a large number for n and now all my DDE orders do not work.
    They work when I use the same spreadsheet on edemo.

    Is there a way to reset the idn?
    I tried restarting my TWS.

    How do you guys work around this idn order issue? This would be dumb if you always have to increase n even when you use it a few days later.

    Thanks!
     
    #11     Nov 2, 2005
  2. R0bert

    R0bert

    i have the same problem with too large last id. does anybody know the solution?
     
    #12     Sep 26, 2006
  3. jsmith

    jsmith

    Anyone know the solution of how to reset the order id number used for IB DDE? Thanks!

     
    #13     Oct 8, 2008
  4. Bob111

    Bob111

    what are you? run out of id's? :) :) :)
    they must be somewhere in settings folder. so the easiest solutin would be to delete accout settings folder.
     
    #14     Oct 8, 2008
  5. jsmith

    jsmith

    I tried deleting the account settings folder.
    I also tried re-installing TWS and API.
    Both didn't work.

    There must be some easy way to reset it. :)

     
    #15     Oct 8, 2008
  6. TraDaToR

    TraDaToR

    Here's where they said it was on the TWS api yahoo group but I never found it...

    In the API directory , you have a tws.xml file... Search mapofstrings and put 0 instead of the number( big ) after it..

    I never found it either so please tell me if you know where it is.
     
    #16     Oct 8, 2008
  7. Bob111

    Bob111

    hhhhmm..just tried it on demo..start from order id 1 on computer,where TWS just installed(880), use few id's, delete demo settings folder-start TWS-starts from 1 again. have to say-i'm using activeX, not DDE.
    maybe your order id's stored somehere in your application and you don't know about it?
     
    #17     Oct 8, 2008
  8. jsmith

    jsmith

    Thanks for your ideas Bob. I guess it's different for Excel DDE.

    When requesting data, it allows me to use lower id numbers like 0,1,2,3,4 and works good. I see this is true since the sample IB Excel always starts from 0 for data requests. For placing orders, IB Excel uses makeID() function.

    I used IB's sample Excel DDE and it sent an order with id724688694 to see the syntax.

    My Excel DDE which was at id1600+ doesn't send orders anymore since idn has to increase. I could always increase my idn to 724688695 but I rather reset it and continue in the 1600s.

    I deleted the settings folder for my user but that still didn't help. Someone using the Excel DDE must've figured out how to reset this..

     
    #18     Oct 8, 2008
  9. TraDaToR

    TraDaToR

    I think I found it but I cannot try it as I 'm trading.

    In your jts folder, open the folder called dlfmqtvn( or something like that ), then open tws.xml file. In this file search for :MapOfStrings varName="ddeIdMap"

    You have 2 numbers following : -1 and the last number. Replace it with 0.

    If it doesn't work, go to the IB website API bulletin board and search for a thread called "duplicate order id ".They explain how to do it.
     
    #19     Oct 9, 2008
  10. Bob111

    Bob111

    that would be a TWS accout settings folder i was talking about earlier.
    you can simply delete it(all TWS settings will be lost) and then order is will be 1
     
    #20     Oct 9, 2008