Line Your Own Pockets

There are dozens of different order types.  Which ones do you actually need to care about?

Creators & Guests

Host
Dave Mabe
Host
Michael Nauss

What is Line Your Own Pockets?

A weekly show for systematic traders who want to make more money from their trading strategies.

Michael:

Alright, everyone. Welcome to Line Your Own Pockets, where we help you create trading strategies with Edge. My name is Michael Noss.

Dave:

And I'm Dave Mabe. And today's topic is order types. So, you know, part of the first step towards systematizing your trading is delving into order types. And there's a whole lot of different order types out there. And, yeah, I know Interactive Brokers has this web page where it does all their order types.

Michael:

Yeah.

Dave:

And it's pretty overwhelming. I don't know if you've ever looked at it, Michael.

Michael:

Yeah. It's insane. And it's funny because most people just end up using market orders, and we know what happens to market orders, which maybe we'll talk a little bit about when they're sent. But, yeah, I've seen that page before, and if you were to print it off, it's probably, what, 10, 15 pages of different

Dave:

At least.

Michael:

Different order types you do. It's it's insane. So, yeah, we're gonna go over, and this might be a multipart episode because there is a lot. But we're just gonna go over the important ones. Right?

Michael:

We're gonna go over the ones that we think are gonna give the most benefit to the most amount of people as opposed to 15 pages of incredibly obscure, order types that, you know, maybe there's a use case for all of them if you get deep enough, but like most things, you know, the simpler, the better, and and the small amount of things that most people use are probably gonna be right for for the most amount of people.

Dave:

Yep. So the first one I wanna talk about is the simple limit order. So, you know, I get a lot of people that say, oh, Dave, you know, I know you trade automatically, but, man, I could never do that. I could never get all over to machine to make trades on my behalf. And one of the first things I say is, hey.

Dave:

Have you ever used a limit order? Mhmm. Limit order is basically automation. Right? It it you can put in a limit order that'll execute, when it gets to that price.

Dave:

So you don't have to sit there and watch the screen and then put in a market order when the price happens to hit that. So that's the first step toward automation that a lot of people are already doing and maybe not even thinking about it that way.

Michael:

Yeah. And it's funny. Even people, prop firm guys, even people that would be considered fully discretionary. Again, as a for a limit order, all we're talking about is I like this stock at $10. And you fill out your order and you say, you know, $10?

Michael:

I wanna buy a 100 shares of the stock. And you just leave it out there. And, yeah, I remember it again going back in time to the prop firm days. That's all we used was limit orders. Even if you were trying to get in aggressively, you could you could cross with a limit order, but you just you set them out there and you're right.

Michael:

It's the first kind of automation where you have decided a price in an area in which you would like to get involved. You've set out that order and then you're letting the market come to you. Big advantage of that is there's not going to be any slippage, right? If you hit a market order like we just talked about, those get kind of routed to different market makers and by the time it hits the exchange, maybe the price has moved. But if I say I wanna buy a stock at $10 and I put it a limit order, I'm getting $10 or I'm not getting filled.

Michael:

And I think that's one of the beauties of it as well.

Dave:

Yeah. I used to use market orders occasionally. And, yeah, now I just use limit orders even, you know, with an aggressive price for that function. I think it's, like, the wise thing to do.

Michael:

Yeah. A 100% where, again, you you never know what can happen with an individual stock, and especially if you're trading systematically and you're trading maybe stocks you're not familiar with. Spreads can get kind of wonky as well, and if you're using market orders, you're always paying that spread. So even if it's still mostly liquid but the spread opens up for a period of time, you're paying that spread, you're doing a lot of things that can, over time, end up costing you a lot of money, whereas, you know, setting that limit, saying this is my price, I'm gonna get this, or nothing else. I'm the same way.

Michael:

Everything I do when I'm when I'm trying to get filled is going to be a limit in some way. If I'm looking for a pullback, I'll set a limit below price and and let that come to me. But, yeah, even if I'm looking to place a trade, and it's it's something that's happening from an alert that gets triggered by my software, it's always I'm willing to pay, you know, 5¢ more than, than what the that price came in. And if the spread is a buck or so, you know, just cancel it and move on with your day. Mhmm.

Dave:

Alright. Let's go to the next one. A stop limit order. So you might know what a stop order is, but you might not know what a stop limit order is and why you would want to use that. Michael, do you use stop limit orders for anything?

Michael:

All the time. All the time. So it's combining the regular stop order that we all know, which says, if this price gets hit, get me out. And I don't want to be in this thing anymore. But as opposed to get me out at any price, you're saying get me out at a reasonable price.

Michael:

So I'm willing to pay whatever, again, let's use a $10 example, instead of I want to buy if the stock comes down to $10 maybe it's trading at $9 now, I'm going to say if the stock gets to $10 I'm willing to pay to like $10.05 or $10.10. I'm willing to pay up a couple cents because it's moving in my direction, and I I think I'm going to need to pay up a few cents to get filled, as opposed to, again, it coming down and hitting your price. And the idea behind this has a lot to do with the fact that you don't wanna send out that market order for the reasons that we just talked about with limit versus market is you can get filled, like, wherever. Right? If especially if the thing's really, really running, you can get filled wherever.

Michael:

I this, I use a lot if I'm looking for, you know, the break of a prior day's high or prior week high, you know, more breakout or more aggressive strategies. I like to use a stop limit that says, hey. If this is going, I want to join the momentum, but not too aggressively in case things really, really go crazy.

Dave:

Yeah. So that that reminds me of, when I learned that a stop limit order was a really good idea. So I was trading this strategy, my the first strategy I was trading, it was looking for a pattern, basically a channel, and then I would get long when the stock when the price went above the high of that channel. And I would use a I was using a stop order for that entry. And, that worked fine for a long time, actually.

Dave:

Mhmm. And then one trade, I realized real fast why it was important to have that. So I I put in my stop order, the trade triggered, and I had a tremendous amount of slippage real fast, like, 10 times what I was risking. Well The 10 r in one trade, because of that, and the price came right back down. So I realized real fast that why you would wanna use a stop limit order in that case.

Dave:

So if I'd used the stop limit order in that case, could have saved 10 r in slippage. And the price, you know, would have blown past my limit order, but the price immediately came back and would have gotten filled at my reasonable price that I've put in there for that limit. And after I started doing that, I was shocked how often that happened. That it you know, the price will go beyond your limit, but very often for this particular strategy, the price would come back down, and I would get a fill. Maybe a minute later, may it may be just a few seconds, but sometimes minutes or minutes you know, several minutes later, and I would get to fill up the price that I was after.

Dave:

So very useful order. Of course, sometimes you don't get bills. You know, sometimes the price doesn't come back, which is why I only use these for entry orders. I don't use these for exit order. Because when I exit, I wanna be out of the stock.

Dave:

And I'm I'm gonna be living with that slippage because I've already said, hey. I want I'm gonna be out of the stock. So, but, yeah, very useful order and one that many traders don't think about and probably I know some very, very experienced traders that I've talked to that have never heard of this order don't know what it does.

Michael:

Yeah. And, you know, the a couple things I wanted to to hit on there. First of all, did you know ever know why that thing ran 10 x for the what do you think it was just a bunch of other algos getting in, or was there a news event or something?

Dave:

I think it was just one of those situations like you sort of hinted at earlier with the spread just got Yeah. Crazy immediately. I think there are probably a lot of orders at that point, and, you know, it's just a common price that people were looking at. So, yeah, I think that's what it was.

Michael:

And that that's kinda what I wanted to bring up because that happens, I find, quite frequently, where a lot I think a lot of people I think there's a lot of conspiracy theories built around. The market maker is is hunting my stock because it, you know, it goes to my area, and then it it it flows through. And what's more likely that happens is you put your stop in a place that a whole bunch of other people put their stop, right, of a very common area. The I always think the cleaner the level of support or resistance that, you know, everyone that who's even looked at technical analysis book is looking at, it's more likely that's gonna get hit. And, that's where these orders really, really help because you're right.

Michael:

If there's, you know, a thousand people have put a stop order at an exact price and then that gets kind of blown through, then it's really just the luck of the draw who grabs that liquidity when when it's there. And then the other thing that I'm glad that you hit on because I was going to if you didn't was just that these are designed for entry orders. Right? You don't wanna use a stop limit on your exit because then, you know, if you have the the situation that they was just stock mode in reverse and that was a news event and maybe it was a bad news event, like, you know, iPhone just start exploding. And and you're like, well, you know, Apple's really liquid, so I could probably get out at the price I want.

Michael:

And then, right, it's just randomly across the world, iPhone start exploding. You're gonna really, really wish that you hit that market order. You took the slippage. You get a little bit mad about it, and then you move on with your day. But I I couldn't agree more.

Michael:

The the stop limit order, for me, especially as a swing trader, is when I'm day trading, I use a lot of limits. When I'm swing trading, I use a lot of stop limits because my swing trading is all about if this stock hits this price, I wanna buy some, and I don't wanna have to be there for it. I I want that to occur kind of on its own. So that's a great one.

Dave:

Michael, how do you decide where to put the limit price on that stop limit order?

Michael:

I've tried just using a generic kind of price. Like most things, I don't think it's the move. I like a percentage of ATR. Right? So, you know, the stock normally trades, say, $0.25 a day.

Michael:

I think I can get away with just a couple of cents. If the stock normally trades, you know, it's a more expensive stock and it trades 5, $6 a day, well, then I might want to pay up a couple of percentage. So I think whatever you do, it has to adapt in some way. So a percentage may be a good way to do it. For me, I don't really like dollars or percentage in in a lot of calculation that I do.

Michael:

I a lot of it has to do with just ATR. So if you have better options, let me know. But, yeah, for me, it's usually it's usually a short term ATR. So, like, maybe a 5 period or or something like that.

Dave:

Yeah. I like that. The other thing that comes to mind and what I use in, one of the strategies that I trade is it's based on the distance to the stop exit. So, so basically, the setup. The setup I'm looking for is this certain range, and I get in if it's above the range.

Dave:

If the price goes above the range, I get out. Once it goes below that range, and in that case, I'll use a percentage of that range as the distance to the limit price. So same sort of concept based on the, you know, not coming out of thin air. This is something that's based in reality and some the history with the the stock itself. So, yeah, like, I think both of those approaches work.

Michael:

Yeah. And as we get kind of further down the the more complexity scale, which we're definitely planning on going, I could think of other ways that would make sense, you know, some sort of version of of MER or MFE, which, again, we'll go over those calculations kind of down the road, but, you know, it's one of those that if you got to look at how much you're looking and how much on average you make or lose in a trade as well. If you run your back test and you're making 15¢ on average a trade, well, you can't pay up 5¢ for that to work, right, or you're eating in your profit. So I like your idea of what am I risking, now let me just because every bit of slippage you take is adding to that risk, so the question is how big are you okay with that risk being? And for me, using ATR for a lot of my risk as well, you know, that's where I've come up with that.

Michael:

That makes sense. And I guess, you know, that's a very good point for the people is just just don't say, oh, I'm willing to pay up 5¢ because 5¢ on a $1 stock is way different than 5¢ on a, you know, a $1,000 stock. Right? It's it's gonna be different depending on the volatility.

Dave:

Yep. Alright. Let's go to the next one. A time stop. This is one that's I'm I'm sure that not not a lot of traders use, and they should.

Michael:

Yep.

Dave:

So time stop is one of the exits that I use in every one of my strategy. So it's once I get in a position, this is how long I'll, stay in that position if the target or the stop that I use don't get hit. So, and you can use some automation, essentially, to set up an order, and Interactive Brokers does this really well. There's a start time that you can associate with any order.

Michael:

Mhmm.

Dave:

And for my time stop, I will use a market order with a start time associated with it. So if I wanna hold till the end of the day, I will put a, market order with a start time at 3:50, And that order will, execute it goes live essentially after 3:50. Important thing about that with Interactive Brokers is that order is live on their order servers. So if you're a machine, you lose power, your machine goes bonkers Yeah. That's the order is still live on Interactive Brokers order servers.

Dave:

So that's super important. That's something I really obsess about. You know, you're thinking about the worst case scenario and what that might be, the rare thing that could happen that could be a very serious situation. That's one of the things I think about, and that's why I use that time stop in every strategy I trade.

Michael:

Yeah. And you'll still be out by the end of the day, which is which is huge. And this is, and there's gonna be a couple of these that I'm excited for. And this is gonna be the difference between where, Dave, who's exclusively a day trader, meets Michael, who is mostly a swing trader. I'm I'm I always work on different day trading strategies, and I'm gonna add it.

Michael:

But I know that swing trading is gonna be my focus just because it it feels the best for me. It makes the most sense to for my personality and everything. I've I'm experimenting, and I'm gonna continue experiment with the exact opposite of what you said where, we talked about stop limits, but I only want them to go live at a certain time. And the reason for that is that when I set my orders to say, you know, I like this stock if it breaks $10, well, how many times off the open do we see these massive spikes in both directions that would get me in if I had a stop limit set on the open and then, you know, immediately be a high slippage or a bad trade. So I think part of the my experiment, and I'll let you guys know as the series go on as I play more with it, is to say only make that order live maybe after the first 15 minutes on the open.

Michael:

So you can use it both ways, because for me, as as someone who's, again, a swing trader and a trend follower, I don't wanna get out of something that's working just because a certain amount of time has passed. But, what I've built into some of my algorithms, and and maybe maybe there's a way to do this in IB and I don't even know it, is that if I'm down in a certain position, I always have a time stop on them because, the way I look at it with a lot of some of my trend following systems is that if they're not working almost immediately after a handful of days or a week or so, I don't wanna be in. But if they're working, I wanna I wanna stay with them. So think about time as a way for the old adage of letting your winners run and and cutting your losers short because I think that's an interesting way to do it as well. So, yeah, very versatile order with a lot of things that you can do, and I I bet you're right.

Michael:

I bet you most people don't do it. For the day trading, I couldn't agree more. Having one attached, if you wanna be out of everything by the end of the day, just in case, like you mentioned, the computer crashes or you just fall asleep or you're on a call with someone or whatever happens, and then the end of the day happens and you're left with a giant portfolio of long and shorts that is now you have to wait till the open to to get a fair price on. Just having that order set can save a lot of headache in the long run for sure.

Dave:

Yeah. And, you know, like all of my exits, they go in immediately as I enter the position. I don't dawdle around. I don't wait and see, you know, what comes to mind or what's like, I have a plan, and those orders go in immediately. In fact, IB has it.

Dave:

Their API is very good, and you it's set up in such a way where you can literally not submit your entry order until your exit orders that are associated with it go live. So that is you know, that gets rid of this the rare situation where my computer would or I would lose power at the instant after my entry order got filled, but the exit orders weren't, IB lets you prevent that situation, which is super nice.

Michael:

Well, yeah, not even. So that's an extreme example, but I think, which can happen, of course, but I think something that'd be even more common is just a news event. Right? And a will it's happened to me. At some point, if you trade long enough, there will be a moment where you hit the buy button, and seconds later, something bad has happened.

Michael:

Right? The the something bad's happened to the company. There was some sort of press release or some sort of earnings. And in the day where as soon as a positive or negative news event hits, there's all of these machine learning AIs that have read it, and they've pulled out keywords, and they've made trades associated on. It can be instant from the moment that that news event happens.

Michael:

So yeah. And then, you know, we talked about this in a prior episode, but that the the killer, I think, for traders in in most situations is the deer in the headlights. Right? You didn't have your order out in advance. You didn't do all that.

Michael:

And then all of a sudden, it's down, you know, 5 times what you were willing to risk. And you're I always have a a a rule that if I ever go to Stockpits to, like, learn about the company I'm in, I have to exit it immediately because that's usually what the deer in the headlights lead to. It's like, oh, well, I'm down, you know, 10% on this stock. Well, let me see what this stock does. Is there any support levels on and you start trying to rationalize that that reason to hold or maybe even add a little bit.

Michael:

And then if it right? So just yeah. Get get your orders out in advance. It it will definitely save you know, so you won't have to have a rule like I am that if I'm if I'm ever researching the fundamentals, then it's probably time to to pull the chute.

Dave:

Yeah. Alright. We got time for 1 more?

Michael:

Absolutely.

Dave:

Alright. So the next one, the last one for the day, I think, is the OCA group. So this isn't necessarily an order type, but it's a property on the orders you can include that groups the orders so they act in concert as one unit. So why is that important? Well, just in our example we gave there, I use a time stop in every one of my strategies.

Dave:

Mhmm. There's also a stop order, a stop loss order for, most all of my strategies. So when you have multiple exit orders, sometimes there's even a target order I put in there. But when you have, you know, more than one exit order, what happens if you get a partial fill on, say, a target, but then and you but you don't get a full fill? What happens to that time stop by the time you get to the end of the day?

Dave:

So let's say you had a 100 share position. You got a partial fill on that target. And without the OCA Group, that OnStop would still be for a 100 shares. You've got 50 shares now for the time that that comes around. The OCA Group solves that because it makes these those orders grouped and working as a unit.

Dave:

So when you get 50 shares filled on that target order, the other orders in the OC OCA group are reduced by 50. So they're all 50, which matches your position size at that point. And that happens throughout the course of the trade. So it's really convenient, and it does exactly what you want it to do in that situation. It also will cancel.

Dave:

So if you cancel one part of the one order in that OCA group, the rest of the order is canceled. So it's a very useful way to, basically automate your exit orders so you don't have to worry about it, and it just does the right thing.

Michael:

Yeah. So just OCA standing for one cancel all. Right? That's the, just to break out the acronym. But, again, hugely important.

Michael:

And I think the most common use and something that actually happened to me recently when I forgot to do this is, like you mentioned, you buy the stock, you set out a limit order to get out of the position, that gets triggered. And if your stop loss order wasn't attached to that limit order, then theoretically the stock come all the way down, which again happened to me on an overnight trade, on futures, hit the stop loss order and now you're you're short. Right? You were originally long and right Because when you sold, that other order just remained out there, it now just turned into an opening, short position order. And, again, that can be that can be super problematic.

Michael:

So, again, these are these are a great way, and I would say they are, you know, the first baby step into automation. Because even if you've discretionarily picked, I'm going to buy this stock because I like the pattern or whatever setting up, and I'm gonna buy it. Immediately, if you put out a stop loss that makes sense and then a profit target that makes sense to you, you've create you've now automated the the back half of all it. You've now automated the whole, idea of right now, I know where to get out. I know how to get out.

Michael:

I know my reason for getting out. And if most people just stop there, I think they'd be way better served, whether it's putting out a trailing stop order right away or putting out and and these these one cancel all orders so that you have both sides done. Then a lot of the emotions of when to take profits are already solved. And that is a a big part of the game is I'd say, I argue, it's always the hardest part of the game is when to get out of position. So if you can kinda solve that, then it it helps with the the greed of, you know, you have your stock running and, like, hey.

Michael:

I I wanna hold in, and it helps with the fear of, you know, potentially moving a stop loss or or silly things that we do. So, you know, now if you just combine these basic order types that we talked about, if you have a limit or a stop limit to get you in and that attaches a profit target and a stop loss order, well, you're already halfway there. Automation. You've decided I like the stock at 10 and if it gets there I wanna buy it and I wanna put it at a stop loss and a target order and if at the end of the day none of those get hit, get me out. Well, not right.

Michael:

You just with one button you've automated most of your trading away. Now it's just why did you select that stock and then why did you select that price, which, that's the more in my opinion, that's the funnest part of trading. That's that's the more enjoyable part of of the system, and then all of the, you know, order entry kind of stuff is is just taken away for you.

Dave:

Yeah. So the yeah. The OSTA group, super important for automation. And when I first discovered that you could do this, it was great because at the time, I was working for AT and T. I had a very limited time to trade.

Dave:

I would trade from 9:30 until 10. I would trade my strategy and then just let the orders play out the rest of the day. I had other work to do. Mhmm. So, my orders would go in.

Dave:

I would set up all the OCA groups, and my orders would just play out. I wouldn't even bother looking at them. I would just look at the end of the day, see how they played out. And, you know, that's pretty powerful to be able to do that.

Michael:

Well and we've talked about the the mental fatigue in trading a few times now, which it for me is one of as someone who has lots of stuff going on when it comes to, right, being on TV stations and talking to this guy and doing CMT stuff and, 2 kids that don't sleep. So, there's a lot of mental fatigue stuff that can happen, and I think the what you just said there is is perfect for most people because we know a lot most people are trading while they're doing something else. And just to have the ability to, you know, I've set up these orders, I've I've I've traded the whole plan entirely, and I can walk away is great for those people, but also people who are trying to trade full time. And they talk you know, I when I talk to traders all the time, it's, oh, I'm too emotional in my trading and and blah blah blah. And that's always my argument to them is, like, well, how about if you're too emotional and you know that sitting there hitting buttons, you're gonna do something stupid, why not just set your orders, close the screen, and and go do something else that's going to make you money or or, right, go go to your work or hang out with your family or whatever it is and and let the system work.

Michael:

So it's shocking how, people will rely on technology to, you know, map them out, to get them places, to to pick what they're gonna have for supper and have it delivered to them and all this. But to get they're terrified to just let their trades work with these orders in place. It's it's a little you know, the planes fly themselves, but people are still worried about putting out a stop loss order and walking away from their screen for a couple of minutes. It's crazy.

Dave:

Yeah. Yeah. The more dangerous thing is not to do it in my mind, in in my opinion.

Michael:

In the long run. Absolutely. So that's I you know, listen. When when Dave brought this topic to me and said, oh, we're gonna have to split this up, I'm like, it's just order types. We could just bang them out real quick, but, no, we're 30 minutes in, and those are just the the absolute top and basic.

Michael:

So I do think we'll probably be doing another, episode next time, maybe get a little bit deeper on more things that we can do with order types, because, yeah, it's a great way just to to start your whole systematic trading journey, just by letting the computer do the absolute basics, which is to get you in, get you out.

Dave:

Yeah. Yeah. I've got probably 4 or 5, probably more than that, that I could talk about. Good. I'd be interested to hear if I got I'm there are gonna be some pretty sophisticated ones that I bet nobody's heard about.

Dave:

If anybody has heard about all these and uses them, I wanna hear from them because I wanna talk to you. Because they'll they'll be some that I guarantee you haven't heard of.

Michael:

Well, awesome. Well, that probably means I also haven't heard of them either, so I'm excited for the next one as well. So make sure you tune in there. I appreciate everyone for coming by, and we'll talk to you next week.

Dave:

Yep. See you next week.