Interactive Brokers DDE EXcel file questions

Discussion in 'Automated Trading' started by benysl, Aug 25, 2006.

  1. benysl



    I downloaded the excel file. I can create and get market data. I want to be able to automate this system a little.

    Can somebody help

    Basically what I want to do is this simple condition

    1) Let say I want to buy a pair of spot forex.
    Eur.usd and usd.gbp when I start the excel.
    2) Exit when there is a profit of $50 or more
    3) Rebuy the same pair after I exit

    anybody can help on this?? or share some idea on how I can do it. The excel file seem more complex than i expected
  2. Clym


    If it seems complex, just focus on undertanding the quotes sheet and the order sheet. (I just ignore the existing conditional sheet, since it never really made sense to me)

    Then just create your own new sheets For example a "Buy" sheet and a "sell" sheet. lay them out however you want.

    As an example, you could have all sorts of conditional formulas laid out on your Buy sheet. If all of them are true, maybe they would add up to 50 or whatever.

    Next you could use the oncalculate property to trigger the order if the cell = 50.

    So that's just a rough outline. If you have no experience with Visual Basic you will need a few reference books in order to figure it out.

    I ended up buying 5 books on VBA for excel. By far the one that helped me the most is "Excel VBA in Easy Steps" (Barnes and Noble In Easy Steps Series) by Ed Robinson. It's very short but covers most of what you need to know to turn to customize and automate the twsdde.xls sheet.
  3. benysl


    hi clym

    thank you very very much, will look deeper into it thanks