I use the Interactive Brokers API and excel to send out orders to buy and sell stock. Years ago I used to have it send a buy order to the bid and sell order on the ask and wait to get filled. However, too many times the market would move (sometimes thin stocks) and the slippage would be too great 30min to hours later when I would finally give up and manually execute. I solved this by simply buying on the ask and selling on the bid which can lose me a penny on thick ETFs and 2c-5c on thinner stocks but it saves me from much bigger slippage when the market moves.
My question is if there is a better way of doing this? I need guaranteed execution at some point that day but was hoping there an algo that I can use that will do better than buying the ask or selling the bid on average? And is that algo available through the API to send out over excel? Thanks for any help.
My question is if there is a better way of doing this? I need guaranteed execution at some point that day but was hoping there an algo that I can use that will do better than buying the ask or selling the bid on average? And is that algo available through the API to send out over excel? Thanks for any help.