IB Excel Sheet: Overflow

Discussion in 'Automated Trading' started by princetontiger8, Mar 6, 2007.

  1. I am getting an overflow error... as of 11am this morning. Anyone have that problem?

    I need to close out my last position in the olympiad, so I am pretty worried.

    Thanks
     
  2. The error is comming form an integer overflow in ib's vba code. When the excel api is forming order id strings is builds a number from the current date. The number if forms always increases, and today that number went higer than 2.147 billion (which is the max allowed integer in a 4 byte integer variable). This is your basic y2k kind of error.

    -C
     
  3. it's ok, im using java now
     
  4. kianti

    kianti

    I have the same problem, I changed VBA and XML code as suggested from IB: the overflow error is gone but I get a duplicate orderID error (Code 135)
    I also tried to lower the highest value in tws.xml but it does not work, since TWS restore the previous value each time you restart it

    Does anyone know how to fix it???
     
  5. I too have fixed the VBA part of the problem, but TWS is still having trouble with duplicate ID's. I had this poblems once before (about a year ago) and It went away when I did a fresh un-install, re-install of TWS, but I really don't want to to that right now. Has anyone out there found a way to fix this through one of the TWS settings files?
     
  6. Raymund

    Raymund

    The issue was linked with the orderID calculated derived on the current date. You need to do 2 things.

    1. Reduce the constant variable orderMult = 1000000 down to 100000 in Twsdde.xls.

    2. The TWS.xml file has to be modified. This will eliminate duplicate orderID occurrence. Please look at the instruction below.

    The last used order ID is stored within the TWS.xml file located within the settings folder for your account login.

    Try doing the following:

    First determine what your unique settings folder location is for this account you can do this by:
    1. Log into the TWS account you are connecting this API to
    2. Select a blank row on the TWS trading screen, make sure you click in the Exchange column
    3. Press the following keys Ctrl+Alt+U
     
  7. kianti

    kianti

    I changed also tws.wed.xml file and now it seems to be working fine
     
  8. Raymund

    Raymund

    The issue was linked with the orderID calculated derived on the current date. You need to do 2 things.

    1. Reduce the constant variable orderMult = 1000000 down to 100000 in Twsdde.xls.

    2. The TWS.xml file has to be modified. This will eliminate duplicate orderID occurrence. Please look at the instruction below.

    The last used order ID is stored within the TWS.xml file located within the settings folder for your account login.

    Try doing the following:

    First determine what your unique settings folder location is for this account you can do this by:
    1. Log into the TWS account you are connecting this API to
    2. Select a blank row on the TWS trading screen, make sure you click in the Exchange column
    3. Press the following keys Ctrl+Alt+U

    This will bring up a pop-up window with your settings folder for this account, navigate to this folder and look for a file called TWS.xml*. Open this file in a text editor and search for the following lines
    "mapofstrings"
    "string" 189839 "string"
    "mapofstrings"

    If you wish to reset your order id to start at a number less than the last used ID you can replace the number encased by "string" "string" tags with 0.

    "mapofstrings"
    "string" 0 "string"
    "mapofstrings"

    NOTE: *you need to edit tws.xml, not tws.day.xml
     
  9. anyone else getting the overflow message? I am getting it today 3/7/07. How do I fix it? Please

    Eric
     
  10. kianti

    kianti

    I changed tws.xlm and wed.tws.xlm from

    MapOfStrings varName="ddeIdMap"
    String>2146780961</string
    'MapOfStrings

    into

    MapOfStrings varName="ddeIdMap"
    String>0</String
    /MapOfStrings

    and now it works fine
     
    #10     Mar 7, 2007