Interactive Broker Auto Excel Trading?

Discussion in 'Automated Trading' started by katiewc, Oct 17, 2008.

  1. katiewc


    Hi I have just started using Interactive Broker's API trading through excel. I am a total newb at it and was wondering if the following is possible.

    I am doing a pairs trade, when stock X and Y are trading at a premium of greater then 25% I would like to buy x and short Y. WHen it is trading below 12 I'd like to unwind the trade. Anyone know an easy way to do this in Excel? I thought about using if/then statements but not quite sure how. Any help greatly appreciated.
  2. Tums


    I wouldn't trust my money in it if I were desperate.

    Go to the library.
    Go get a book... dummy books.
    Take a night course.
    Check the web... there are tons of FREE Excel tutorials... from colleges and universities.

    Start reading... and experimenting.
    Whether it is easy or not, only you can tell.
  3. katiewc


    hmm sorry not quite sure what u mean by wouldn't trust your money in it. I'm just trying to see if anyone knows how to set up an automated trading thing in excel as I don't know how to do it. My rules for trading work fine if that's what you meant, just need to automate it.
  4. Tums


    no, I am not referring to your rules... don't know your system, can't comment on it.
  5. katiewc


    can anyone help?
  6. katiewc


  7. TraDaToR


    Yes of course.

    You need to learn the DDE syntax for excel in this guide:

    Make your calculations in cells, program a macro that run every second, minute ... to identify when conditions are met and place the orders in dedicated cells.

    There is an example of spreadsheet , IBTwsdde. xls on the website.
  8. katiewc


    thk you so much for your help
    greatly appreciated