Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
IB FYI: Important information about Market Orders

My algorithm is trading live on Interactive Brokers and I received from them the following email message:

Please note that a Market Order is an instruction to trade your order at any price available in the market, subject to any additional instructions for handling/simulating the particular order type you specified and other order conditions you specify when submitting your order. A Market Order is not guaranteed a specific trade price and may trade at an undesirable price. If you would like greater control over the trade prices you receive, please submit your order using a Limit Order, which is an instruction to place your order at or better than the specified limit price, or submit an algorithmic Market Order (IBALGO).

I'm using order_target_percent and I thought that the default already was Limit Order (see https://www.quantopian.com/help#exchange-routing)

Should I set explicitly use style=LimitOrder(limit_price, exchange)? and which is the best was to set the limit_price*?

2 responses

I added to the buy orders LimitOrder(data.current(stock, 'price') * 1.025, exchange=IBExchange.SMART) but that changed considerably the result of the backtest. How realistic is this assumption or should I use another threshold?