Simple automated program with ib.

Discussion in 'Automated Trading' started by lkh, Feb 6, 2007.

  1. lkh

    lkh

    Hi i would like to start experimenting with automated trading. I have ib as a broker and would like to stick with them. I would like to scan a list of about 200 stocks in excel or something using ib data and send an order if the following conditions are met.
    1. Stock down 3 days in a row.
    2.Stock down at least $1 over 3 days.
    3 On 3rd day stock trades below open and then trades through open.
    Buy stop entered when stock trades through open with a stop at low of the day.


    Is this an easy thing to set up? Can someone give me an idea how to do it. I know very little about programing so be gentle. Thanks
     
  2. rosy2

    rosy2



    you might get an answer on the ib API forum. but basically
    1) just get a connection first.
    2) request historical data (theres a historical method) and store it somehow, maybe hashmap
    3)find the stocks that meet your criteria
    4)place your order with a stop condition attached.

    if you have little programming experience this will take a long time and much frustration. Otherwise, it will take a while and some frustration but it is not overly difficult.
     
  3. GTG

    GTG

    I think IB limits you to like 50 or 100 data streams, so you may not be able to scan 200 stocks.
     
  4. IB has a limit of 100 concurrent data strerams (it increases with commissions over $800 a month).

    Historical data is limited to 60 requests over 10 minutes (currently -- this changes periodically without notification). The timeframes allowed for each type of request have been posted on the IB message board.

    There is supposedly a limit on how much historical data (total) you can download but it's huge -- I've never hit it and I've downloaded several GB of 1 minute futures data over about 3 days without running into it.

    IB also has a scanner you can use in TWS or access via the API -- that may be able to do what you want without getting any data -- check it out.

    SSB