Help with traling stop order on IB

Discussion in 'Order Execution' started by john7722, Jan 5, 2023.

  1. john7722

    john7722

    Could you help me with IB trailing stops
    Do I understand trailing stop correctly?
    I buy at $100
    I set the trail at $5
    I set the stp at $90

    If the price drops to $90 the position will be closed
    If it goes to 106 my stp will be automacally moved to $101 and the trade will close at $101
    if it goes to 120 my stp will be automatically moved to $115 and my trade will close at $115

    Thank you for your help
     
  2. smallfil

    smallfil

    I think the trailing stop has you set an amount below the current price. In your example, a stock @ $100 with a $5 trailing stop will move, $5 behind the current price. So, the stock goes to $102 and your $5 trailing stop will be at $97, it gets triggered once, the price hits $97 or lower. The stop loss order is static @ $90 unless, you manually, adjust it, in this case upwards. This would be a OCO combination order since, you have two different orders going on all at once. So, one cancels the other. Once, one of the stop losses, be it the trailing stop or the stop loss order is triggered, the other order will be cancelled. Both orders become market orders once, triggered.
     
  3. john7722

    john7722

    Thank you . That is exactly what I was looking for. That OCO combination order.
     
  4. M.W.

    M.W.

    If you truly intend what you describe then neither order in isolation nor combination achieves that.

    My understanding is you want to set an initial static stop loss 10 dollars below entry and then a trailing stop loss once the stock starts moving in your direction? If your trailing stop is tighter than your static stop then you will need to set up your static stop and also set up a conditional order and link both as OCO. If your static stop is hit then the conditional order is cancelled. On the other hand, the conditional order would become active once the price starts moving, let's say when crossing above 105. When the conditional order kicks in and turns into a trailing stop order and gets triggered the OCA would cancel your static stop as well. Not sure you can set this up with IB. I run fully algorithmic via IB and created my custom order algorithms and logic that can do anything I like.

    At least this would implement the intent to give the position initially more room before it starts moving in your direction yet tighten the stop once it moved by a certain amount via a trailing stop that is tighter than your static stop.

     
    Last edited: Jan 5, 2023
  5. Bad_Badness

    Bad_Badness

    He wants a Trail Stop with Trigger?
    Trigger = point at which the trails order becomes active.

    Also note John, that sometimes the trail, once triggered becomes a "Pegged" order. You can read about pegged order at IB, or on ET. But that is down the rabbit hole, and as MW points out, that is when you go custom with a script.

    Lastly play with this on paper. The trail amount is always a positive number, long or short, as I recall. The pegged order type is also a bit of trial and error, it is not adjustable, and is "special" when it comes to cancels-overfills.
     
    Last edited: Jan 5, 2023
    M.W. likes this.