In this episode, John discusses how to set your stop-loss using a variety of manual and automated techniques.
In this episode you will learn about:
- A tool that will help you calculate your stop loss size based on risk
- An indicator designed to set stop losses
- How to use a trailing stop
- Programmatically setting your stop-loss
- Why you would want to set a stop-loss in the first place
Resources for this episode:
- The Forex Calculator, from SmartForexTools
- Burton Rothberg‘s article “Setting Stops the Bayesian Way“
- My Programmer’s Checklist download
- RSS Feed for this podcast: http://blog.tradertechtalk.com/feed/podcast/
When I first started really learning about trading, I learned strategies, and techniques and indicators, and it was all really interesting, but the question I kept asking myself was, “Ok, that’s nice, but where do I set my stops?” and “Wow, awesome strategy. Now, where do I put my stops?” Not all books and courses are guilty of this, but it seemed that setting your stops was kind of an after-thought to the process.
My early losses in trading made me realize that stops were really important, and no matter how good the stock tip or recommendation, the price could go down. Then what?
So, today we’re going to talk about 4 or 5 different ways we can use to set stop losses in our trading systems. Some of the methods work well for manual trading, and some work better for automated trading.
First of all, just as a review or for new traders, what is a stop? A stop, or stop-loss, is an automatic exit of your trade if it goes in the wrong direction. So, for example, let’s say you are trading the Euro-dollar, and bought at 1.32. If it goes up, great, you make money when you sell. If it goes down, your stop loss is placed so that it automatically sells your trade at a loss at a pre-determined number. The reason for a stop-loss is to make you take a small loss, so that you don’t end up with a bigger loss later. Without a stop-loss, the Euro could keep going down until your account is wiped out. You don’t want that, so you take losses in small increments, using the stop-loss.
So, with that out of the way, how do you know where to set your stop-loss? The simplest way to set your set your stop is just to pick a number of pips or points below your buy, or above your sell, and stick to it. So, in our Euro example, we might put our stop-loss at 20 pips below the entry point. If the price moves down 20 pips, it closes the trade at a 20-pip loss. The advantage of this approach is that it’s really easy to do, and to be frank, a simple stop loss strategy is so much better than no stop loss at all. Honestly, if I had learned about stop losses before I began trading, I’d be thousands of dollars richer at this point.
The disadvantage of the simple 20-pip stop loss is that it doesn’t really take into account how much you are trading. For example, if you have placed a trade for a half a lot, a 20 pip loss is 1% of your account of $10,000. But if your trade size is 2 lots, that’s 4% of your account. And a bigger lot size means you have more and more at risk. So it’s clear that just picking a number of pips doesn’t really protect you from ruin, if you don’t take how large your trade size is.
Another commonly used technique to set stops is to use a price point on the chart, say a recent high, or a recent low, or a visual point on the chart below support or above resistance. This is smart because it makes you pay attention to what is happening on the chart. Instead of an arbitrary number, you set your stops so that if price breaks below support, you’re out. But you’re still left with the question of how much risk is involved. Even though you’re using visual support or resistance levels, you don’t really know if you are risking 1% or 5% of your account total in one trade.
So, a better approach might be to use a tool. There are a number of spreadsheets available online or from books that help you calculate risk, stop-loss level and trade position size, but I prefer a tool I have been using for a couple years now called the Forex Calculator. It’s another great tool from Forex Smart Tools (forexsmarttools.com). A few months ago, I reviewed the Forex Trade Log, which is another tool I’ve used.
The Forex Calculator is particularly helpful in determining your stop loss when you are trading manually. It’s not used in creating automated trading systems, although it’s quite useful as a “sanity check” to see if the stops you are using make sense. But its intended use is to help you determine stop-loss placement and position size when you are placing a trade.
A quick overview of the program is in order: The Forex Calculator has several tabs for Scaling in, Open Cost Averaging, and other multi-leg plans, where the math for stops and position size can get quite complicated. But to be honest, when I use the tool, I almost always go to the “Quick” tab, where I just enter in my buy or sell price, and an estimate of where I want to put the stop, and the calculator chooses the position size based on my 1% risk profile. I can adjust my stop level up or down until I am satisfied that I have at least a 1:2 risk to reward level.
Let’s talk about that for a minute. When you set your stops, what you are actually doing is saying “I’m willing to lose X amount of money if the trade goes the wrong way in return for a gain of Y if the trade goes in my direction.” In other words, my target to close the trade at a profit should be twice as far out there as my stop loss. It wouldn’t make sense to aim for 5 pips of profit and have a stop loss at 10 pips—you’re risking a lot to make only a little. Now, in the actual course of trading, you might find that you didn’t reach your profit target, and you only got 5 pips of profit before you had to close the trade, but the point is that your trade set up should aim to have a larger reward that your risk; that is, a risk-to-reward ratio of more than one.
OK, back to our discussion. The Forex Calculator helps us determine where to place our stops so that we are not risking too much of our account. It protects us from ruining our accounts. That’s awesome. If you haven’t seen this tool, take a look at it; I’ll have the link to it in the show notes. Or find one of the free spreadsheets that does some of the same stuff.
Here’s another tool that you can investigate in your manual trading, and this will segue into the automated trading section of this podcast. Trailing stops are stops that move along with your trade. First of all, note that you still need to place a regular stop-loss on your trade, in case the trade moves against you right away, so don’t forget about that. But a trailing stop is a stop that kicks in as soon as your trade is profitable. A trailing stop will always move up with price (for a buy, anyway), never down. (Obviously for a sell, it’s the opposite direction).
So, as you probably know, price fluctuates up and down once you open a trade. Let’s say you’ve opened a trade on the Euro, and you have a profit target of 50 pips, and you’ve set a stop loss at 10 pips below your entry. Price moves up 40 pips, and then moves down to where you opened the trade, and then it goes down 10 more pips, and you’re out at a loss. Bummer. If you’re thinking what I’m thinking, you’re thinking “Nuts. I should have sold it at 40 pips profit!” A trailing stop can help you here. A trailing stop has 2 components when to start, and how far back to trail the price. So, let’s say we set our start at 15 pips profit, and our trailing number to 10 pips. Back to our example, you buy the Euro, and price moves up 15 pips. As soon as that happens, a new stop-loss gets set at 10 pips below where price is right now. Then price moves up to that 40-pip level, as in the previous example, and our stop loss is now 10-pips below the current price. Now, when price turns around, it will hit our stop, and the trade closes in profit! Instead of the loss we saw earlier, we have a profit of, I think, 30 pips. Sure, we didn’t make our target of 50, but we preserved some of that upward movement.
So, here’s the best part. If we are writing automated systems, we can use indicators and other math to set our stops for us automatically. This idea comes from Jake Bernstein’s book “The Ultimate Day Trader.” The idea is to use a 3-period moving average of the high or low to set your trailing stop. For example, if you want to set a trailing stop for a long position (that is, a buy), you take the low value for the last 3 bars and divide it by 3. That’s where you set your stop. Each new bar will re-calculate the placement for that stop, based on the average of the previous 3 bar’s lows. Simple, but effective. This allows you to have a trailing stop that follows price, but isn’t so close to price that normal volatility will trigger the stop.
Every trading platform has moving average calculation built in, so creating a strategy and using the 3-period moving average to set your trailing stop is easy and much better than a fixed stop. You can broaden the range a bit by using a 5-period moving average, and so on. Don’t forget, you still need to set an initial stop, but once your trade moves into profit, this moving average trailing stop kicks in.
There is one indicator that is often used to set stops as well, and this is called the Parabolic Stop and Reverse, also known as the Parabolic SAR. This indicator was designed by J. Wells Wilder, Jr. In its calculation, it uses an “Extreme Point” which is the highest price point during an up-trend, and the lowest price point during a down-trend. The indicator’s formula has a multiplier that “accelerates” each time a new extreme point is reached.
Take a look on your trading platform, and set up Parabolic SAR and see if using it to set stops works for you in manual trading. If you like how it behaves, you can try to use it in your trading systems. In Metatrader, the function is called iSAR(), and it has all of the standard parameters such as currency pair and time frame, but also the acceleration factor is something you can play with. The standard value for this is 0.02, but experiment with it to see how it works.
One note of caution and that is that the Parabolic SAR only works in trending markets; in sideways markets, you get whipsawed back and forth, and it’s ugly. Wilder recommends determining the upward or downward trend first, and then implement the SAR. (As an aside, how do we determine the trend? Well, that’s a topic for a whole different podcast.)
Ok, the last thing we’re going to talk about regarding setting stops in automated systems is from an article in the June 2013 issues of Futures Magazine, titled “Setting Stops the Bayesian Way”. The author, Burton Rothberg, describes a way to use statistics to determine where your stops should be over time. His article is geared towards longer time frames than I typically trade, but the article is quite interesting, and I think it can be adapted to shorter time frames. I suspect this won’t work well with very short time frames, but it should work well for 4-hour, 8-hour or day charts just fine.
I will link to the article in the show notes, but here’s the gist of the idea. You pick your profit target, and you pick when you think price will rise to that point (assuming we are going long). For example, say we are trading the Euro, and we go long at 1.3280, and have a profit target of 1.3380 in 10 bars. We have a difference of 10 pips, over 10 bars. That means we should be rising 1 pip per bar. I realize that price doesn’t move like that, but stay with me. So, Rothberg defines that progression of prices as the “assumed path”. At each bar, you will have an actual price, and you subtract the assumed path price from the actual price. Then the Bayesian math is used to calculate a statistical value called the “mean of distribution” from the current price. That’s the deciding factor. If the mean of distribution is less than the assumed path value, then we stop out.
In general here’s what’s going on: our path from current price to our target profit is a straight line. Using the statistics, we can see if we’re on target to get to our profit or not. If we’re not on target to get there, we stop out.
I contacted the author Mr. Rothberg about this, and he said that shorter time frames, but he also said that the point of this wasn’t to create something that would blindly spit out stop loss levels, but to assist the trader. In his words, “this is not purely a deterministic model that will input a price series and output a decision. It is meant to be a way of combining the trader’s judgement and price action.” So, less an automated system and more a trader’s assisting tool.
We don’t have time to go into the math for this here, but Rothberg provides a neat spreadsheet to experiment with the Bayesian calculations. If you check out the article on the Futures Magazine web site, you’ll find a link to the spreadsheet there.
So, in review, we discussed setting stops using the Forex Calculator, using trailing stops, programming in a 3-bar stop, and then looking at Bayesian math to help set stops. You can see that you can use lots of different methods to calculate where to put your stops. This might be harder to do when you are trading manually, but you can incorporate many of these ideas into your trading systems easily. The goal of stops is to lose as little as possible when price goes against you, and gain as much as possible when price moves in your favor. Don’t forget that.