Selling 1/2 at Profit Target, then executing Trailing Stop Loss (TrailLimit?)

Discussion in 'Automated Trading' started by Iggy_Type_R, Jul 23, 2009.

  1. Hi folks,

    I have searched far and wide and have had little luck in getting an answer to
    this order via IB API...

    In TWS I can just use Adjustable Order functionality, but it's not supported in API so I am trying to figure out an alternative. Please let me know if this does or does not make sense! :)

    What I want to do is the following:

    Say a stock opens at $20.00

    I SELL SHORT if it hits $18.00 at say 200 shares, with Stop Loss at $22.00
    When it hits $16.00 I want to BUY 100 shares and set BUY TRAILING STOP (or
    LIMIT?) $1.00 away from $16.00 (so 17.00 to start but you get the idea) for the
    remaining 100 shares.

    In TWS I can set up an Adjusted Order to a TRIGGER PRICE of $16.00, but API
    doesn't seem to have that trigger price.

    So far I've come up with a theory that if I use a BUY TRAILLIMIT order with
    AuxPrice/LmtPrice at $1.00 and trailStopPrice() at $16.00 might I get the same

    Apologies if this has basic errors regarding LMT/STP prices I am struggling a
    little to figure out if to apply LMT price because the price is higher than
    current or if higher than the trailStopPrice according to the formula above.

    Thank you in advance for any help or advice!

  2. Figured it out... have to split order into two orders.