Questions for Experienced IB Automated Traders

Discussion in 'Automated Trading' started by jonnysharp, Mar 5, 2010.

  1. Hi all,

    I'm trying to develop a automated intraday stock trading system with IB.

    I have a dilemma which I thought some of you on here may be able to help me with.

    I have a profitable trading strategy, however in real life trading its not profitable due to slippage and commissions, as you can see it uses market orders to enter and exit. I realize I need to switch to limit orders.

    My question to similar IB traders is, what order type do you use to provide liquidity? anyone use IBalgos? Do you post or chase price? How often are you matched at the midpoint? How do you exit a position whilst providing liquidity? wouldn't you run a chance of being left holding the bag if your waiting for a fill on a exit that doesn't execute? Any other tips on how to reduce slippage in liquid NYSE stocks?

    Any insight or help is greatly appreciated.

  2. gigi


    Today, because of HFT, you need to use market orders. Limit orders will only be filled when the market goes against you.

    There was another article with a much nicer explanation but I can't find it anymore.


    In other words, you get filled when it is highly unfavorable, but do not get filled when you would want to be filled. This is clearly a losing game for anyone who uses limit orders, discourages investors from offering liquidity and does not add to the integrity of the NBBO.
  3. Ok...

    So let me see if I can give you a hand here, here are my thoughts.

    If you hit with a limit order you may or may not be left holding the bag. I have written algorithms where I adjust limit orders so that you are not left holding the bag. These adjustments happen in split seconds. Using these algo's I have reduced slippage quite a bit.

    The problem is that you need to adjust your sizes and that can get challenging.

    The other approach is to hit the market using the bid ask pair. The market always has liquidity, and you see it in market depth. Read the market depth and make some guesses. Use these guesses and correlate them to what happened in the market. That way you can pick out how much impact you are having.

    The algo's from IB are allright and should serve the purpose. But when running backtests you need to recreate the algo's. Whenever I run backtests I always recreate the order execution. That way I can simulate slippage and other market reactions.


  4. rosy2


    never use market orders.
    LMT to provide liquidity.

    - when you get your signal place a LMT order
    -leave it there as long as the signal is good else cxl
    -exits can be LMT through the market prices (ie. buy LMT 20 when mkt offer is 18)
  5. thanks guys,

    Apparently you can't direct route via API on unbundled pricing, so it would make using peg to midpoint orders not worth it, since you can only route them to ISLAND. Also this rules out using IBalgo, CSFBalgo and JEFFalgo's too. What's the point of having these order types if you can't make use of them in an API environment where they would work best? Don't understand IB's logic here, they are too hell bent on everyone using SMART routing, prob to fill the books of Timberhill.

    Looks like custom code to make limit orders chase is going to be the only way, definitely not the easy option though.

    or does anyone know if trailing orders rest on the exchange? or do they rest on the IB server, in other words if I trail limit buy by 0.01 and the market is bid 20.05 up 20.06, will my order be on the exchange for 20.05 ? or will it only execute as a mkt order if stock dropped to 20.04 up 20.05 ?