Close Navigation
Ctrl + Alt + Trade

Ctrl + Alt + Trade

Episode 400

Posted June 30, 2026 at 12:40 pm

Andrew Wilkinson , Dave Mabe
Interactive Brokers , Trade Ideas

To watch this video you must accept functional cookies.

What happens when you let code handle the execution while you focus on the strategy? Dave Mabe joins the IBKR podcast to share how automation, backtesting and the Interactive Brokers API helped him scale from hundreds to thousands of trades while avoiding costly manual mistakes.

AUDIO PLACEHOLDER

Summary – IBKR Podcasts Ep. 400

The following is a summary of a live audio recording and may contain errors in spelling or grammar. Although IBKR has edited for clarity no material changes have been made.

Andrew Wilkinson

Welcome to this week’s episode. My guest today was, at one point, a computer engineer before becoming CTO for Trade Ideas, where his role enabled him to design innovative algorithms for rules-based trading systems and process improvement. Welcome to the program, Dave Mabe. 

Dave Mabe

Thank you, Andrew. Good to be here. Appreciate you having me. 

Andrew Wilkinson

Well, so that the audience knows, Dave joins me regularly on webinars, and we get so many questions within those webinars, we don’t get to answer them all. So we thought we’d try and address that in today’s session. Dave, what led you into building trading systems, and at what point did you realize that this deserved 100% of your time or career? 

Dave Mabe

Yeah, so I started just doing it on the side. I started with a manual trading system. It worked pretty well right off the bat. I was quite prepared before I made my very first trade, so I’m a pretty thorough person. So I was fully prepared when I went live. I’m pretty careful with money and such. And I realized, over time, that I was my own ceiling. There were only so many trades I could make. I had a full-time job at the time, so I realized I needed a way to have the computer make trades for me because I had a system that’s very clearly defined. I was starting to backtest it, so I realized I could remove that ceiling by having a programmatic solution. The webinar we did where there were so many questions was where I talked about scale, how I scaled up my trading using the Interactive Brokers API. 

Andrew Wilkinson

Now, after leaving Trading Ideas, Dave became super focused on trading more than 25 models of his own creation using his unique backtesting framework. Not only does Dave have a podcast of his own called “Line Your Own Pockets,” and I have the T-shirt as well, folks, but Dave also has a free email newsletter all about backtesting and strategy creation, which you can find at davemabe.com. As part of his daily routine, Dave kindly spends an hour each month with me on our webinar program, delivering great content and assistance to those who are keen to build systems of their own. That brings us to our topic for today, which is the overflow of questions that we get each month relating to backtesting, where to find data, and sundry items. So let’s dive into common questions from real IBKR clients. Dave, I think the first question that we identified here was: What was the trading problem that the IBKR API solved for you? 

Dave Mabe

Yeah. So I realized that I was making a lot of mistakes when I was trading manually. You’re computing your position size manually, you’re punching it into a form. There’s a lot of opportunity for mistakes there, and of course, humans are very error-prone, and I was no different. I realized that I could get rid of all those mistakes, have my position sizes computed automatically, have all my orders entered automatically, and when I automated those, all of a sudden I went from 350 trades a year to 3,000 trades a year. 

So basically, it’s a way to—I call it “scaling wide.” If you’ve got a good strategy that works, you could trade the same trades but just with bigger size. But an underrated approach for scaling a strategy is to scale wide, to take more trades. So that’s the idea of what I was doing here, and that’s what the Interactive Brokers API really allowed me to do. 

Andrew Wilkinson

One of the most frequently asked questions is, where can traders get historical market data that they use to backtest? 

Dave Mabe

It’s a good question. So there is data included with the Interactive Brokers API. It’s good to get started there. It comes with your account. Typically, traders will start with that, and then once they run into some of the limitations, there are other data providers you can use. There’s two that I can name right off the top. IQFeed is a data provider I’ve used for many years. Another one is Polygon, who recently changed their name to Massive. These are two data sources you could use to get a lot of historical data and load it into a backtesting database. I have some free tools on my site that make this a lot easier if you’re using one of those tools. 

So yeah, I have a whole pipeline set up so that every day when I walk in and log into my computer, all that backtesting data is already imported into my database from the previous day, and it’s all refreshed. So there’s a couple of different ways to do it, but yeah, market data is an important thing to think about. 

Andrew Wilkinson

Now, lots of people have a hard time wrapping their heads around a computer making trades automatically. Is there a way to paper trade? This is what we get asked a lot on these webinars. Is there a way to paper trade before putting real money at risk? 

Dave Mabe

Yes. So this is one of the very underrated things about the Interactive Brokers API. In the order properties for the orders that you’re using in the API that you’re sending using the computer, there’s a property there called transmit, and what this allows you to do is—it’s a Boolean, so you can either set it to true or false. Also, another thing is you have a free paper trading account that’s included with your normal account. So you can send orders to your paper trading account exactly as you would a live account. So you can test there. Then the next stage, once you get that process working, there’s another feature of the API that is really convenient.  So let’s say you’ve done your paper trading, and now you’re ready to trade live. You’re still a little nervous. You don’t want to potentially have a whole bunch of trades going through. You want to just verify before they actually go live. So that’s where you use this transmit property. And the thing I like about it is I have a checkbox in my program that sends trades that says, “Okay, actually make the trades live.” If I don’t check that box, they still go to Trader Workstation, but they go into a queued state, so they’re not active, and they show up just as if you would enter your trades manually. You just click the transmit button. You can verify, “Okay, everything looks exactly like I’m expecting.” So it’s this other layer of verification that you can use that’s really unique to Interactive Brokers and the API. 

Andrew Wilkinson

Excellent. Now, a lot of people, when they come to one of these webinars, are somewhat familiar with—well, many of them are very familiar with—APIs. I may ask the question, “Well, what’s the big advantage? What does IBKR do that other people don’t do? What are the advantages of IBKR’s API over others, Dave?” 

Dave Mabe

Good question. I’ve been using this API for many years now. I think the first API trade I made was in 2008. The reason I’m still using the Interactive Brokers API is for a couple of different reasons. One is it’s not necessarily the API itself, it’s the API in conjunction with the order types that you have available. It’s almost overwhelming, the number of order types you have, but what they allow you to do is your program that you’re writing to execute the API trades can be a lot simpler because of the breadth of order types that you have available. So, for example, all my orders go in a batch of orders. So I’ve got one entry order, and all my exits are in what’s called an OCA group. All those go in at the same time. So there’s lots of flexibility there. If you didn’t have that flexibility, and other APIs don’t have that flexibility, all that logic of which ones are going to cancel if one fills, if one partially fills, all that’s handled on Interactive Brokers’ order servers automatically. So your program can be a lot simpler. You don’t have to handle all that logic, which is very error-prone. It’s a lot harder than you think it is to get that right. So the API, in conjunction with those order types, really makes a nice experience for developers and a very efficient way to enter orders using the API. 

The other important thing about this is all those orders are running on Interactive Brokers’ order servers. So when I first started doing this, I was thinking about, okay, what’s the worst thing that could happen here? That’s where my mind goes. And I thought, okay, well, I could lose power. A computer could go down. I don’t want to be at risk of something where I can’t put in my exit orders because it happened at the instant after I entered an order and I didn’t have my exit orders in time. Well, with the way the architecture is set up with the IB API, that’s literally not possible because the way it’s set up, I can have an entire batch of orders, all my exit orders, sent at the same time as my entry order. They all go live at the same time, so there’s not a situation where my entry order’s live, but my exit orders aren’t live yet. It put my mind at such ease to have that flexibility, and it’s something you just can’t find anywhere else. 

Andrew Wilkinson

And OCA, for anybody who’s not heard the term, stands for one cancels all. Is that right, Dave? 

Dave Mabe

That’s right. Yeah, it’s an important concept, and it’s just very convenient to be able to do with Interactive Brokers in a way that you just don’t find at other brokers. 

Andrew Wilkinson

Very good. One final question—two questions, really, Dave. You must hear stories about both success and failure in this world of automation. Can you think of a success story and a horror story? 

Dave Mabe

Yeah, there’s plenty of them. The horror stories stick out in your mind more, probably. I can remember the very trade I made where I realized the importance of a stop-limit order. There’s an article in my newsletter about this. 

So I had been trading the system for some time, and I was using a stop order for entries. So basically, it would become a market order after the price was breached. And I was using that for the entry. I was not using a stop-limit order, and in this instance, I realized that I should have been. So basically, my order got sent. I was risking a certain amount. I looked down, my trade had been sent. I looked down, and I’d lost 10 times the amount of money that I thought I was risking. So, like, what in the world just happened here? Well, it was a pretty thin stock, and the price just blew right through the market and filled me at a way worse price. It immediately came back and hit my stop and then continued without me. So it was such a valuable lesson to learn. But a lot of times traders have to go through it themselves to really experience it, and this was one of those instances with me. 

Andrew Wilkinson

Yikes. 

Dave Mabe

Success stories. Oh, man. Nothing gives me more satisfaction than working with a trader that has had some success. 

This is kind of the perfect trader that I work with: somebody that’s had some success, and maybe all of a sudden their strategy is tailing off. Maybe it’s not working as well as it once was. Maybe they’re in a drawdown, and their identity is at risk here. Like, “Wow, I’m a trader here, and I’m not making money. What’s going on?” To really put a process in place for them to adapt and be able to adapt in the future when these things happen, to create more strategies, to have a better process for testing their own ideas and coming up with profitable edges—to see that really come to fruition and see some of the people I’ve worked with who are putting up some staggering numbers is really gratifying to see. 

Andrew Wilkinson

Very good. Dave, thank you for being my guest today. Can you let us know where we can reach you? 

Dave Mabe

So the easiest way, I’ve got a free course on backtesting. It’s a six-day course that comes over email. Totally free. A lot of traders get a lot of use out of that. You can go to betterbacktesting.com and sign up for that. Again, it’s free. The emails you get come directly from my personal email, so if you have any questions, you can just hit reply, and it comes right to me, and I read all those emails. 

I don’t get to respond to every single one these days, but I definitely read every one. 

Andrew Wilkinson

And remind me of the name of the podcast. 

Dave Mabe

The podcast is called Line Your Own Pockets

Andrew Wilkinson: Available on Spotify and everywhere. 

Dave Mabe

Yes. 

Andrew Wilkinson

Brilliant. Okay. Thank you very much indeed, Dave Mabe. 

Dave Mabe

Thanks, Andrew, for having me. 

Andrew Wilkinson

All right, and to the audience, if you enjoyed today’s episode, don’t forget to subscribe wherever you download yours from. Thanks, everybody. Bye for now. 

Join The Conversation

For specific platform feedback and suggestions, please submit it directly to our team using these instructions.

If you have an account-specific question or concern, please reach out to Client Services.

We encourage you to look through our FAQs before posting. Your question may already be covered!

Leave a Reply

Disclosure: Interactive Brokers

The analysis in this material is provided for information only and is not and should not be construed as an offer to sell or the solicitation of an offer to buy any security. To the extent that this material discusses general market activity, industry or sector trends or other broad-based economic or political conditions, it should not be construed as research or investment advice. To the extent that it includes references to specific securities, commodities, currencies, or other instruments, those references do not constitute a recommendation by IBKR to buy, sell or hold such investments. This material does not and is not intended to take into account the particular financial conditions, investment objectives or requirements of individual customers. Before acting on this material, you should consider whether it is suitable for your particular circumstances and, as necessary, seek professional advice.

The views and opinions expressed herein are those of the author and do not necessarily reflect the views of Interactive Brokers, its affiliates, or its employees.

Disclosure: API Examples Discussed

Please keep in mind that the examples discussed in this material are purely for technical demonstration purposes, and do not constitute trading advice. Also, it is important to remember that placing trades in a paper account is recommended before any live trading.

Disclosure: IBKR Tools

The projections or other information regarding the likelihood of various investment outcomes generated by the Tool mentioned are hypothetical in nature, do not reflect actual investment results, and are not guarantees of future results. It is important to understand that these projections are based on certain assumptions and models, and actual outcomes may differ significantly. Please note that results may vary over time.

Disclosure: Order Types / TWS

The order types available through Interactive Brokers LLC's trading platforms are designed to help you limit your loss and/or lock in a profit. Market conditions and other factors may affect execution. In general, orders guarantee a fill or guarantee a price, but not both. In extreme market conditions, an order may either be executed at a different price than anticipated or may not be filled in the marketplace.

IBKR Campus Newsletters

This website uses cookies to collect usage information in order to offer a better browsing experience. By browsing this site or by clicking on the "ACCEPT COOKIES" button you accept our Cookie Policy.