thinkorswim DDE in excel

Discussion in 'Automated Trading' started by milos, Feb 23, 2010.

  1. milos

    milos

    Hi guys,

    I have done some programming in Excel, and I was able to program most major technical indicators in VBA. Now when I am supposed to put them to work, I am running into a major problem!

    I programmed Excel to create a new row and add new ThinkOrSwim DDE link data as it comes in. So newest data is always in row 1, and all the other old data is in the rows below. The longer the Excel stays on, the more data I collect.

    Now, I've noticed that DDE gets updated by ThinkorSwim even if there are no changes to the data. This results in Excel thinking there is a change and it stores data on the sheet.

    Has anyone successfully programmed ThinkOrSwim DDE with Excel? If not, does anyone recommend any other programs/brokers which will stream live data into Excel so I can run my Macros on it?


    Thank you all.
     
  2. MGB

    MGB

    Here's an idea on how to handle that. After Row 1 is entered, compare Row 1 and Row 2. If they are the same, delete Row 2.
     
  3. Use VBA's setlinkondata to collect all of your dde updates into an array. This will be about 100 times faster because you are not writing to the excel grid with its associated overhead. Use VBA to update your grid using whatever criteria you determine to warrant a new record.
     
  4. milos, what code did you use to do what you originally had? im trying to do the same thing but I actually do want the duplicate entries
     
  5. Hi guys,

    I have few skills in programming in excel and I'd like to create a DDE link with ThinkOrSwim trade platform. Could anyone in this forum help me by posting some code lines? I just want to get real-time quotes and some other basic info such as symbol, open, low, high, volume, ask, bid, time etc.

    Thanks in advance
     
  6. mich

    mich

    I have retrieved similar information from StrategyRunner into Excel
    Formulas:
    =Console|MINI_NSDQ!Bid,
    =Console|MINI_NSDQ!Last,
     
  7. mich,

    Very nice. Helped a lot! Thanks,