IB API Excel Application?

Discussion in 'Automated Trading' started by drenaud, May 23, 2011.

  1. drenaud


    I want to build an application that will do the following:

    It is started with a price to purchase a combo. Ie, the user inputs that I want to purchase on a combo at 1.00.

    If the trade goes off enter a sell order at the average cost of the postion(s) + XX cents.

    Also enter an order to add to the position at average cost of the positon - XX cents.

    So each time a postion is added it figure the new avg cost and creates a sell order at average + XX cents.

    The app would stop when the postion count got to YY or if the postion count was zero. That is the sell order got hit.

    So here is the question.. could this be built using excel? I have no programing experience but I feel confident in excel.
  2. Bob111


  3. drenaud


    Ugh, sounds like programming.

    Is there something between excel and hard core programming?

    Do things like ninja scripting fall between?
  4. Bob111


    have no idea.
    VBA is not a hard core,but not drag and drop either..it does require some basic programming skills to put the s**t together. dunno about ninja
  5. C99


    try messing around with a scale order in IB in paper acct. It comes very close to what you want. I have not used it live but have tried it in paper account just to see what it does. I was able to get it to work on a combo order but I am not sure if it will work off of an avg fill price like you want, i had it calculating the next set of orders from last fill price.
  6. TraDaToR


  7. drenaud


    I am going to look into scale trader tomorrow.

    It sounds like it may give me most of what I am looking for.

    If not sounds like it is coding time. Yuk.
  8. drenaud


    I tried the scale trader. It doesn't use the average price when placing a profit order.

    I dont understand IB's logic. You could be 'scaling' into a trade and set a profit offset but you could close your postion for a loss.

    As I see it the postions needs to come back to it's original price to have a profit.

    Here is what I am seeing.
    You buy 100 ABC for 50. You set a profit taking order of 1.00. You tell scale trader to buy 100 more ABC at 40. It gets filled. Your Average is now 45. The problem is scale will try and sell 100 at 41. Since it is FIFO you now have a loss of 9X100. It wont sell the other 100 until 51.

    I would think that the scale should try and sell 200 at 46.