When entering a trade, how do you choose the point of the stop loss and take profit? Clearly, this decision will have an impact on how profitable your trades are. However, did you know that the placement of your exit levels *can* actually have *more* of a bearing on your profitability than the decision on which direction to trade?

In the volatile forex market, it is actually true. Given how important this decision is, it is surprising how little thought many traders give to this component of their trade.

In this article, I want to explain a quantitative strategy that will help you select stops and take profit levels for maximum profit. I also want to debunk some of the common misunderstanding around risk-reward setups, and show how following poor advice can ruin a potentially good trading system.

If you just want to try the stop loss/take profit calculator, and are not interested in the theory, please click here.

## Why *Guessing* Stop Losses and Take Profits is a Plan for Failure

A trading position will normally exit at one of two points. After entering the trade, either:

- The price reaches the take profit (
**TP**), and the trade finishes in profit - The price reaches the stop loss (
**SL**), and the trade winds up with a loss

When deciding trade exits, it is sometimes tempting to make an educated guess. Some traders use technical features such as chart candles, trends, resistances and supports. Others simply choose a fixed ratio of profit target to stop loss.

While this is very common, there are several drawbacks:

- It is error prone. When you guess the exit levels for a trade it is very easy to either overestimate or underestimate price movements.
- It is not repeatable and that makes it very difficult to analyze or improve performance. When there is no logic or methodology behind placements of exit points, you never know if a failure was due to a miscalculated TP/SL combination or because your strategy is not working.
- Traders will often move stops up or down on subsequent trades based on trial and error trying to find a “sweet spot”.
- It is very difficult to automate methods that rely on gut instinct or other subjective decisions.

There is nothing wrong with using technical analysis as a guide for timing the trade entry, nor for judging how far the price might move. Rather, the method I describe below is used alongside both charting and fundamental analysis.

## The Fallacy of Using SL/TP as Proxy Risk-Reward

Forex trading forums are full of well meaning, yet rather misguided advice about risk-reward setups and how to set your stop losses. Unfortunately, many of these people fail to understand the true meaning of risk or reward.

The idea that simply setting your stop loss *smaller* than your take profits will achieve a certain risk reward is complete nonsense.

Using **risk/reward** to set your trade entry and exits does not make any sense *unless* you know the probability of outcomes in a given trade.

Take this simple example. Suppose there is a lottery costing $1 to enter. The prize is $1m. By the definition of the naïve trader, this gives:

**Risk: **$1**
Reward: **$1m

**1,000,000**

Reward/Risk ratio:

Reward/Risk ratio:

By that definition, this would seem a fantastic game to play. However, suppose we know that two million people enter the lottery. This makes the odds of winning 1:2,000,000 (one in two million). Now we know the odds, we can calculate the *true* risk reward:

**True risk**: *p*(loss) x *E*(loss) = (1- 1/2000000) x ($1)

**True reward**: *p*(win) x *E*(win) = (1/2000000) x ($1,000,000)

**True reward/risk ratio: 0.5**

In other words, for every $1 you put into this lottery, you’d expect to get 50 cents back. Most would now agree this is not a very good game. Even though on the naïve trader’s reckoning, it had a reward to risk ratio of one million.

This example highlights the fallacy of using stops and take profits as a measure of your risk/reward.

In a trade, we have the real risk/reward defined by:

**Reward: ***p*(win) x *E*(win)

Risk: *p*(lose) x *E*(lose)

Reward/Risk ratio:*p*(win) x *E*(win) / *p*(lose) x *E*(lose)

*E*(win) is the expected payoff in the trade, namely your take profit amount. *E*(lose) is your stop loss amount.

## The Risk-Reward Relationship

The first thing to realize about setting trade exit points is that the amount of profit you want to make on a trade is directly proportional to the risk you will need to take to capture that profit.

This is not a supposition, but rather a mathematical fact.

Take the following trading scenario. Say for example that a trader sees an upward trend on the hourly chart for USD/JPY (see chart below). The trend has been in place for around one day, so the trader thinks there is a good opportunity for profit.

He decides on the following setup:

**Entry:** Buy USD/JPY@ 109.70

**Stop:** 109.50 (20 pips)

**Take profit:** 110.40 (70 pips)

Now let’s analyze this trade setup in more detail. The first thing to notice is the trader wants to capture a profit of 70 pips on the trade.

So what is wrong with this setup?

Based on recent price data for this currency pair, we can calculate that USD/JPY has an hourly volatility of 26.4 pips. That means, on average, the movement of the price over one hour is 26.4 pips. Sometimes more, sometimes less but this is the average.

This means the trader is trying to profit by 70 pips. In reality, he is actually betting *against* the market because he is relying on the fact that the price will not descend more than 20 pips from the open price during the life of the trade. That could be up to 30 hours if the current trend continues (from Figure 1).

Given the hourly volatility in USD/JPY is currently over 26 pips, this much stability in price would be highly unlikely. While the trade has a very low maximum loss (20 pips), which might seem like a plus, the chances of it finishing in profit are extremely low.

If we know on average that the price of USD/JPY moves up or down by 26.4 pips every hour, why would it do anything different for this particular trade? The answer is that it would not and the trade would probably strike the stop loss for that reason.

Due to the volatility in FX, this is true even if the predicted trend continues.

The basic problem with the setup was that trader was trying to capture too much profit without accounting for volatility.

Remember that in forex, volatility is not something you can avoid by careful trade picking or a clever strategy. It is an absolute certainty.

That’s why it is far better to make volatility work *for you* rather than against you.

The question then is when setting up a trade, how do you know where to place the exit points other than just taking a wild guess? The following will explain how to do this.

## Calculating Stop Losses and Take Profits Using Maximals

The method I prefer to use is based on a technique known as *maximals*. What this does is give a precise formula to work out the probability of the price moving a certain distance from the open during a given time.

This model gives a complete distribution of price moves for a given volatility. This method works for any timeframe, minutes hours or even months. It also works equally well with either historical (past) or implied (future) volatility.

In deciding trade exit points, there are three things to consider:

**The expected timeframe of the trade (related to profit target)****The market trending behavior****The profit target**

Let’s take a look at each of these.

### Step 1: The Time Frame

The type of trader you are will have a bearing on the time that your trades need to stay open to reach your profit target.

A day trader or a scalper would hold a position for hours, minutes or even seconds. At the other extreme, a carry trader holds positions for weeks, or months. For the carry trader, capital gain on the trade is usually less important. The goal is to hold the position open for as long as possible to accumulate interest.

Clearly then, profit and time are linked. So in setting your trade exit points, the first step is know precisely how far the price is *likely* to move in a given timeframe. Once you know this, you will be able to decide a realistic profit target.

Take the following example. Figure 2 below shows EUR/USD over five minute intervals (M5). The chart spans a 24-hour period.

The first thing I do is calculate the volatility over my chosen period. From the open/close data, I calculate that to be just over 10 pips per 5-minute period.

Once I know how volatile the market is, I can project the price forwards to work out the probability of a certain move *x* hours (defined by 5-minute intervals) into the future.

To do this, I need to calculate what are known as **maximal curves** (see box for an explanation). Briefly, taking the volatility as input these curves will tell me the probability of a maximum price (either up or down) being reached.

Figure 3 below shows the maximal curves calculated for 1 hour to 24 hours ahead for the EUR/USD chart.

For example, looking at the maximal curve for 24 hours (top line), I know the price has a 76.8% probability of moving 62 pips within a 24-hour period. Whereas it has a 40% probability of moving more than 141 pips in that same time frame.

##### The Random Walk

I only give a brief description here of what are rather complex calculations. The best market model we have for forex is the random step process or random walk.

This just means that in every interval, the market moves by a random step value. The price can slant towards an uptrend or a downtrend with a drift parameter.

*Z*, using the volatility into a standard unit variable for comparison against the step process. From this we create a set of curves for different timeframes.

In essence, the longer the time interval and the greater the volatility, the further the price can move from the existing level.

From these we can calculate the probability of a price change over any length of time.

Hedge funds and professional traders often use maximal curves or some variant thereof. The reason they are so important is that they allow you to setup your trade accurately in terms of time and profit capture. The curve tells you if the amount of profit you want to make is reasonable in terms of the time span.

For example, I know if I wanted to capture a 300-pip movement, I would likely be waiting roughly ten-days based on the current volatility level. This is because from the curve, there is only a 10% chance of the price moving 300 pips in any 24-hour period.

### Step 2: The Market

If the market is flat, or trending in a certain direction this will have a strong bearing on where you place your stops and profits. In terms of the model, it means that we have an asymmetric distribution of price movements.

There are several ways to allow for this, but the simplest and the one I prefer is to use a different volatility for the upside and downside price model.

The statistical skew is useful here because it tells you how asymmetric the volatility distribution is and allows you to add an upwards/downwards drift.

**Market**

**Random walk – not trending
Trend up – positive drift
Trend down – negative drift**

With the random walk, up and down price moves are equally likely. When trending, two different sets of maximal curves are needed, one for up moves and another for down.

### Step 3: The Profit Target

Having decided on a timeframe and on the trending characteristics, I can now choose an appropriate profit target that will give my trade a high win probability.

Say I’ve checked the chart, and decided to buy at the current market level, and I decide my target will be +40 pips and my cut off will be -100 pips.

The table below gives the probability of my exit points being reached in each of the three market conditions.

Take profit @ +40 pips |
Stop loss @ -100 pips |
|||||

Hour |
Flat |
Trend+ |
Trend- |
Flat |
Trend+ |
Trend- |

24 | 82% | 66% | 88% | 57% | 70% | 27% |

18 | 79% | 61% | 86% | 51% | 65% | 20% |

12 | 75% | 53% | 83% | 42% | 58% | 12% |

6 | 65% | 38% | 76% | 25% | 44% | 3% |

4 | 58% | 28% | 70% | 16% | 34% | 1% |

2 | 44% | 13% | 59% | 5% | 18% | .01% |

1 | 28% | 3% | 46% | .4% | 6% | 0% |

*Trend*+: Trend in same direction

*Trend*– : Trend reverses direction

*Flat*: Sideways market

My trade setup is then:

Take profit **+40 pips** 82% probability of reaching TP within 24 hours

Stop loss **-100 pips** 57% probability of reaching SL within 24 hours

**Entry price:** Buy 1.1290

**Take profit:** 1.1330 (+40 pips)

**Stop:** 1.1190 (-100 pips)

What this analysis tells me is that EUR/USD has a certain chance of reaching the **TP/SL** levels within my trade timeframe. But it doesn’t tell me which is reached first.

What I would also like to see is the probability of the trade actually making a profit or loss. The price could reach the stop first, and then the take profit. In that case, my trade would finish with a loss. It could alternatively reach the take profit first, in which case it wins. Alternatively, it may neither reach the stop nor take profit level in which case the trade remains open.

Based on this analysis I can use standard probability theory to work out each outcome for the trade:

Outcome |
Flat |
Trend+ |
Trend- |

p(win) | 63% | 42% | 82% |

p(lose) | 29% | 47% | 9% |

p(open) | 8% | 10% | 9% |

Win ratio |
68% |
47% |
90% |

My best outcome happens if the short-term trend reverses, that is if the market rises and makes my *buy* profitable. The worst outcome happens if the trend continues in the same direction (*trend+*). In that case, I have a 42% chance of the trade ending in profit, and a 47% chance of it ending in a loss.

When I set the trade up what I am looking for is the chance of the take profit being reached, to be **at least** *1.5x* the chance of the stop being reached. This will give a win ratio of around 70% or higher.

Also, remember that if you move the stop loss or take profit while the trade is open that gives you an entirely different set of outcomes.

### Analyzing the Trade

To see how the stop and take profit levels shift for different trading timeframes, I can work out an envelope, which will give me a fixed win ratio. The graph below in Figure 4 shows this plotted out for my example trade.

From this, I can see that if I were trading over a 12-hour period, I could choose to set:

**SL = -67.3 / TP= +26.9**

That would achieve the same win ratio. It would also give a lower profit of just +26.9 pips.

With my 24-hour timeframe, I can also see how the possible outcomes will change over time.

The chart below (Figure 5) shows the probability of a win, a loss, or the trade remaining open over 24 hours – the expected lifetime of my trade.

From the chart, I can see it has the highest chance of closing in profit within the first 90 minutes of being opened. Thereafter, the chance of a loss rises significantly.

This is because the maximal curves become flatter for longer periods. If you check Figure 3 again, you will see that the curves for 24-hours and 18 hours are quite similar, whereas there is a big difference between the 1 hour and 6-hour curves. The highest differential is in the first few intervals where the curves are steepest.

### Money Management

As shown above, your stop distances *have to* work in terms of your profit target and the volatility levels.

New traders often place stop losses too tight, thinking they are reducing risk. The usual reason for this is that they are using far too much leverage and try to reduce exposure by placing limits on individual trades. It is better to manage risk through trade size (exposure) than to use stop losses which don’t make sense.

Suppose you see a trading opportunity, and the potential drawdown needs to be 300 pips to capture that profit. If 300 pips is not an acceptable loss, then it is better to reduce leverage and adjust your trade size downwards to give you more flexibility.

Instead of trading one lot, consider trading in one tenth of a lot units or lower.

What is most important is that a potential loss (or drawdown amount) on a trade should be manageable within your account. This should be part of an overall money management strategy so that you know your loss limits and those losses, even in succession will not cause a margin call or bankrupt your account.

Remember, over-leverage is the **#1 killer of new forex traders**.

## Stop Loss Calculator

I provide the Excel spreadsheet with all calculations here so that you can download it and try this system out for yourself.

For instructions on how to use the sheet, please see here. The spreadsheet does not have the live price feed which the MT4 indicator uses, but you can manually paste in historical price data from MetaTrader to work out optimum take profit and stop losses in the same way I’ve explained.

The MetaTrader indicator, which does the same calculations in real time and includes additional features is also available. See below for more details.

Metatrader Stop Loss Take Profit Indicator

Hi Steve, hope you are doing well 🙂 Awesome indicators – I love how everything is mathematically explained and makes great sense! (I have a math/engineering background). Already purchased a few of the indicators and looking for my next one to buy 🙂

For this Stop Loss/Take Profit indicator, is there any reason that 288 periods were used for generating the outputs?

I find that most trends on the pairs I trade move in 20-30 period cycles, so I use that as the sampling period so I can for example bring up a 15 min chart and have an SLTP value that coincides (rather than use a longer period and have to consult the shorter timeframe for SLTP values). Is that too short a period?

What would be cool is if shorter timeframe SLTP values could be displayed on the longer timeframe chart.

Hope what I wrote makes sense! Thanks.

There’s no special reason for the period 288 other than it’s one complete day in the M5 chart. It’s also within the limits of where the calculations will work. About 20 to 1000 intervals is the optimum.

Great! Thanks!

This is fascinating stuff. Is there any way to use the spreadsheet for equities?

I trade equities more than forex.

Thanks

It should work on the short scale, day trading for example. You would probably need to do some scaling of the data in the spreadsheet depending on the price ranges.

“Instead of trading one lot, consider trading in one tenth of a lot units or lower.”

This is a basic principle in the art of trading

A lot of people that are undercapitalized trade one full lot or futures contracts

Although, trading more flexible units does not mean you are going to win…that is another story.

What formula do You use for the estimation of trending parameters from the data sample?

Which part are you referring to exactly?

All parts)

The formula to estimate any trending bias is based on a measure of upward/downward volatility. In the examples above (maximal curves) a “flat market” model was used. This doesn’t mean no trending it just means there’s no prior assumption about direction of the trend.

Steve, thank you very much for this article. As per wikipedia ( https://en.wikipedia.org/wiki/Random_walk ), the second part of the factorial should be n-m, not m+n. Is this a typo, or I do miss something? Thanks

The formula I’ve shown in the box above is that for finding the probability of a maximum point being reached in a random walk – that is any point at or below the maximum. I checked this just now with the Wikipedia version and in fact unless n (the time you are looking forward) is very small the two formulas (n+m) or (n-m) give identical results. This is because of the symmetry of the combinatorial function. But the right one according to the reflection principle is (n+m). There’s also the special case to use (n + m + 1) where the parity is different in m and n. And because of the symmetry (m+n+1) is identical to (n-m). Again unless n is very small this won’t make much difference to the numbers if you use either (n+m) or (n-m).

Thanks a lot for the explanation. Could you also kindly explain how m is related with the 62 pips?

As I understand it:

n = total number of steps

m = the number of steps needed to touch +62 pips

In the formula we know what is the probability that the max will happen after m steps, but how is this related with +62 pips. How do we know that this is 62 pips and no more / less ? Thanks

The pip movement depends on the scaling factor in the random process. That scaling is governed by two things:

The time period for each step – for e.g. if it’s 5 minutes, 15-minutes, 1 hour or whatever.

And secondly the volatility because that will tell you the expected movement in the random process for a given time step.

From that you can work out the expected distance and convert to pips or percent.

Hi Steve do you happen to know the financial theory that happens to have a close connection with the stop loss order? very nice article

The underlying theory is most always based on stochastic probability models. This is used to characterize price volatility and risk. In the basic theory a characterization of volatility is found and this is then used as way to model the price development. That being in terms of a probability distribution that allows some kind of forward prediction. But there are plenty of others which cover more obscure areas.

There’s also distortion risk models which try to model long tail events. For example the process of stop losses distorting prices as certain levels are hit or of high-impact/low probability events that fall beyond conventional models.

Financial risk management and VAR theory is a good starting point.

Hi,

Maybe you are planning mt5 version of this indicator? I already have mt4 version, but mt4 is a lot slower in backtesting.

Have a nice day.

They said mt5 is faster. Cannot say have seen a difference yet in my backtesting but I guess it depends what you are doing.

There isn’t an MT5 version at the moment, maybe later on if there’s more demand for it.

A very interesting article.

On Feb 23 2015, you gave the equations for p(win), p(lose) & p(open) in an answer to BYO2000. Most of it makes sense to me, but can you please explain how to arrived at the equations for p(win first) and p(lose first).

Thanks

Nick

Sure. This is a conditional probability using standard theory.

If the price touched both the stop loss and the take profit during a time frame then

there are two distinct probabilities with that set: Either it touched the SL first or it touched the TP first

during that period. Hence the two different cases to count for this.

Great job, but I personally don’t trust that much the random walk theory. It states, that future princes are normally distributed and the probability to take each value depends on the standard deviation (volatility in this case.)

Based on that, how can big price fluctuations be explained ? For example, taking random walk as an absolute truth, it would be extremely bizarre to see prices fluctuations above 3ơ (3 times the volatility) since probability is less than 1% but if you look at the market it has happen quite a lot.

If you required the specific examples let me know I will show you.

I want to know your opinion about this, and if is possible, have an idea of how efficient is this strategy when you use it.

Thanks a lot

I completely get where you’re coming from. A lot of people – especially technical traders – don’t agree with the RWM. That’s their opinion. I am not going to spend a lot time defending it as there are people out there who can do a lot better job than I can. Though what I can say is that much of the criticism I’ve seen is unjustified or just plain wrong. What you say above only holds true if you assume that volatility and drift in the model never changes. Actually though these components are changing all the time.

Volatility measuring is by definition lagging so you can never know what the instantaneous volatility is. You can only estimate it based on information available at the time. So when you say a 3x volatility move, what that really means is 3x what the volatility was in the past. Not what it is at a given instant. This is a limitation of measurement not the model. As I mentioned in the article implied volatility can give you a forward measure and that can be used instead.

So far RWM is the best and simplest explanation of market moves I have yet seen. If something better comes along I’ll be the first to use it. I’ve seen advanced simulators and I can tell you that you can’t tell the difference between them and any other price chart – every type of chart pattern is seen and is reproducible. The word “random” just seems to be a red flag to a lot of people. But the RWM has both a deterministic and non-deterministic part and it’s the deterministic part we try to discover and trade on.

Hi can you explain how to upload new metatrader data in the excel spread sheet please? Thanks your help is appreciated.

I would be grateful if you could perhaps give a more detailed explanation as to how you calculated the “maximals” table (as used in your Excel Worksheet).

At first glance, it does seem to be related to some form of cumulative function of the “p(Yn=m)” probability you mention in the “Random Walk” explanation box – maybe some kind of cumulative distribution function, but it is not described here.

I read the related material and links provided about the “Random Walk”, as well as other sources of information by different authors, but can’t seem to find anything that would explain how you calculated the “maximals” table.

The maximals are a forecast of how far the price is expected to move (maximal distance) over a certain time. That’s taken from the random walk model with or without a drift component. The drift gives the trend so that allows the model to forecast changes in different directions (other than a flat market). There are standard mathematical procedures for working this out and creating a discrete time-based probability distribution from it. From that distribution it’s possible to work out the probability of a price move within a certain time interval.

There’s some more discussion about it here. Duke uni also has a lot of good info on this subject. The above papers are giving an overview.

There’s something I don’t understand. Your chances of winning are higher (let’s say 68.3% to cite your example), but the amount you would win is lower (26.9) than the amount you lose (-67.3).

This leads to a negative expected return:

0.683*26.9+(1-0.683)*(-67.3) = -2.9614

So, if you run this strategy many times you’ll end up losing money, right?

You also have to account for the probability of the trade still being open. There’s an 8% probability that the price doesn’t reach either the stop or take profit and that accounts for the missing value in the expectation. So the value (1-0.683) in your formula doesn’t account for all other outcomes which have to be integrated over to find the true expectation. There’s always a finite probability that the trade will be open however long you wait. If you look at figure 5 for example the p(open) graph gets smaller but it never quite becomes zero. In either case this is a truth of computation – it’s not something that applies just to this strategy.

Indeed, the expected profitability of a trade if I am not mistaken should be an integral of an asymmetric capped maximal curve. Have you per chance made this computation in your testing, as I think this is the most relevant quantity to optimize on?

Another thing is that this is still very simplistic in the sense that the construction of your stop loss and take profit are based on how you built your signal. My understanding is that the signal you built is a simplistic version of something along this line: if you feel that the market is overselling an asset (downward trend) you will buy (hence the trend+ and trend- that were not very intuitive on the first reading). Then wanting to build your asymmetric maximal curve makes sense since you look at an asymmetric volatility which kind of tell you if the trend was fundamentally stopping and the future was noise, I can still expect the market to trend lower by x pips due to underlying volatility. I am not sure the way you measure it though makes sense given that in fact, what you want to look at is the volatility of the price if there were no trend going on, which will give you limit that will be breached quickly if the trend was to continue and the prediction was wrong. I feel this is in a sense a better way to include the potential signal into your stop loss, as the stop loss should then be tighter but on a justifiable note.

Overall I quite like the ideas you expose here, but I feel the main point which is the expected return computed from the integration of maximal curve is missing, as this is what is verifiable in live trading or backtest.

The more interesting question to me is the reverse hypothesis. That being the maximum likelihood estimator (MLE) of the trend and volatility given a noisy sequence of prices. Because without knowing this any expected return would in any case be zero when you cannot make any prior assumption on trend direction (the deterministic) and you have a symmetric range of probabilities. Solutions to the MLE can be found but that does mean using Monte Carlo simulation or something similar since there are no closed forms to this problem. This is something we are working on.

Does that indicator work on anything for e.g. on CFD or just forex?

It should work on most instruments including CFDs: Metals, Oil and so on. If you have any problems just raise a support request.

i think if you use rrr like this, this %82 tp probability also cant do any help for our accounts,

but may be this is what us new traders want to hear, wide stop loss and tight take profit, it is alluring for newbies

thanks…..

özkan (izmir/ Turkiye)

Nobody here is recommending an sl or any other value.

The article is an analysis of the stop loss placement and what result that is having on your rr and on probability winning or losing the trade.

If you had read further than para one you would understand your remark has no logic but is the view of the amateur.

Hi Steve,

Great article-thanks very much. Is the spreadsheet still active so that historical data can be copied, or has it been protected since the last posts? I have Excel 2010 but there is no apparent way to paste data in the Input tab.

Yes it is still active. No, it’s not locked. But to edit you will need to save a local copy. This is because Excel 2010 and later will disable edits for any spreadsheets downloaded from the web. If you are still having an issue with this please use the contact form to get in touch and I’ll take a look.

Thanks, the problem seemed to be with Excel 2010. I tried 2013 and it works fine.

Hi, I was wondering how the maximal curves are built using estimated volatility. given 5m volatility of 10pips, so volatility for 24hr = s5*sqrt(24*60/12)=0.01697pips. Then for P(X>=TP) we can use z = (x-mu)/s24 and Pr(z>=(TP-mu)/s24), for TP=40pips and mu=0, im not getting 82%probability but 100%. I’m not sure this is the right way to do it. Wondering if you could point me to how to build those curves?

Thanks

Please see reply below.

Hi, nice article I’m trying to understand it. I have a question about how sample volatility is used in the calculation of maximal curves.

Am i supposed to approximate the binomial dist with std normal using z=(x-mu)/s = x/s if mu=0, s=0.001 then calculate P(z>c) where c is TP. So if s5=0.0010 per 5m, we get 24hr volatility as s24=s5*sqrt(24*60/5)=0.01697, if target price is 40pips then is P(x>=.0040) or using z, P(z>=0.0040/s24) but this doesn’t give me 82% chance of reaching TP?

Further, doing this only gives me the prob of z being above c at the “end” of the holding period. but that’s not what we want, we want to find P(z>c) at any intermediate time? Would be great if you could explain.

Thanks

It is a cumulative probability of maximal distance traversed in a certain time. So by that definition it covers all intermediate times between such as P(z>c) in your notation. I would also calculate the 24 hour volatility directly if that is what you need, rather than trying to scale up from 5M timeframes.

Excuse me Steve,

is this spreadsheet valid only for the EURUSD pair? I tried to use it with AUDUSD values but got thousands pips large TP and SL… While with EURUSD values it works perfectly.

Thank you.

Yes it is compatible with AUD/USD. This problem is most likely due mixed data histories. Please ensure all of the old data is removed and reset the “pip value” selector.

Alternative you can use the MT4 indicator which is now available and does this for you:

http://forexop.com/products/mt4indicators/6380/

This is a very detailed article and confirm to me what I thought when I approached the Forex market after a short period of trading. You mentioned at the end of the article that you have also an EA that make the same calculations of the TP/SL as your great Excel spreadsheet and I would be very happy to integrate it in my own EA used to trade.

Is it available for download free? Does it work on “live” data taken directly from MT4 without the need to export them?

Thank you very much for your answer and for your website!

Luca

Yes it can work with a live price feed. It could be made available as an MT indicator in the future – but that would depend on the interest as it would need to be recoded.

is this spreadsheet valid only for the Pounds pair?

It should work with any pair. If you’re importing data from Metatrader please make sure the sizing is correctly set in the data tab.

Hi, I can`t paste right, I mean when I copy historical data from MT4, and paste it to input as you said, there are no spaces between the comma, and it is not divided as on your picture. In your picture each cell gives one information like date, etc, but when I paste it the information starts in one cell and ends in another. I have new excel, what should I do?

Regards,

Michał

If your data is all in one column as it sounds then you need to use the “text to column” function in Excel to format it into separate cells. If you saved it and opened it as a csv file it would normally do this for you.

One of the best articles I’ve found on stop and profit targets. Thanks for sharing your knowledge with a newbie like me!

problem with excel file can you upload it again?

You will need Excel 2010 or later otherwise some of the features will not work.

Hi, I can`t paste the same as you when I use data from MT4. The numbers f.ex. start in one cell and end in the other. I have new excel. What should I do?

That’s a very nice of you Mr. Steve. According to calculating volatility and RRR, I am wondering that as a day trader with a very short horizon period of investment. Ex. 5-15 Mins chart. This method could be potentially help any trades? Why I said so? What being said is that If I my trade set up were 2/1 RRR, which I have to set my SL at -200% and TP at +100%. In the long run, do you think this kind of statistic will help the trades to win? Literally, taking a smaller pips and widening a SL could really boost up a winning percentage which means that once I losses such any single trades I have to try to double up profitability to cover such losses. Here come to my question, in this kind of situation that I earlier mentioned, do you have any way to fix it? or if the theory you mentioned works, how could you adapt to use with scalping trader and day trader style?. Thank you very much for your consideration in advance.

It’s a good point and one I should have expanded on in the article. In my opinion it doesn’t make a lot of sense to have a fixed ratio of SL to TP for all cases. The choice should be dynamic because it depends entirely on the situation you are trading and the market conditions.

A breakout trade for example may have a low probability of success but a high payoff. As well it is usually clear after a short time whether the breakout is going to happen or not. In that case it doesn’t make much sense to allow say a 2:1 SL/TP which would allow a big drawdown. When in fact if the draw happens you already know the setup has failed. In other situations the reverse may be true.

Great article. Can you explain why you calculate volatility on open/close data? “From the open/close data, I calculate that to be just over 10 pips per 5-minute period.” Why don’t you use the ATR or high/low data? I’m trading daily charts, so the difference is quite large.

You can use ATR. You can also use the Bollinger bandwidth as a vol measure. Whichever you use you should get roughly the same ratio of TP/SL however because the measures are relative to each other and not absolute. If you need to calculate a specific probability then in this case some calibration is needed depending on which vol metric is being used.

thank you for your good strategy . i have question : i tried to calculate probability for volatility of 10 pip per 5 min

for 1 hour for distance 51. which gave us n=12 and m=6 for box formula. but i calculate 5% for probability and from your curves it seems true percentage is 15% can you tell me why my result are different ?

thanks

Your value seems too low. Because these are probability functions the curves need to be worked out as a cumulative value of the function (not the point value) over the move distance you are looking at.

Probably the best forex article I ever read.

Hi, very nice and useful article. I was wondering if it was possible to have a numerical example of how to calculate the probability using random walk. In your example, are you assuming a drift component=1? Or less?

Thank you in advance. Bye

Where’s the EA?

“You can have the price rising then falling in which case it passes a TP AND SL. For eg. If you have very close TP/SL then these have near 100% chances of being hit.” If you imagine a space of outcomes you have

p(SL only hit)

P(TP only hit)

P(SL and TP hit)

P(Neither TP nor SL hit)”

ECB

EURNZD, EURAUD, EURGBP, EURCAD whipsaw upwards before collapsing. The greatest one was the EURGBP this time round.

(One either widens their SLs 150-200pips for crosses or tightened stops risked a larger loss when it hits the SL. Other than staying out completely.

Prior to ECB, EURCAD went to low of 1.36945. The whipsaw touched SL of 1.3765 before retracing downwards. For a short position, adding a Stop Loss gave away profit of 70 pips. Does assigning probability described applies to risk events like ECB?

(The EURGBP is now back at the same level, though it whipsawed the most. )

What’s your view about contrarian trades (that agrees with TA at the time you look at it)? example would you have longed the EURNZD on Mar 5, would using this probability analysis tell one not to long but short it instead although the charts are long – Measuring the strength/continuity of reversal moves.

@Cheryl

-Does assigning probability described applies to risk events like ECB?

Not unless these events occur frequently within the time sample you are looking at, but even then its unlikely you could ever model them to predict an outcome. Major news releases – those with very high impact – are by their nature unpredictable and can/will change the trajectory of the price in ways that are beyond normal statistically analysis.

@Cheryl

-What’s your view about contrarian trades (that agrees with TA at the time you look at it)? example would you have longed the EURNZD

Absolutely, contrarian trades can and do work – but then there are limits, I would be cautious about trading contrarian against strong fundamentals. For eg, I wouldn’t long EURNZD – simply because of the swap yield of -4.24% on the long side. The strong downward trend for the last six years is a reflection of that. But then if you’re scalping a few pips here and there it can make sense, and sure the Euro is going to turn sooner or later.

The maximal curves show the probability of how many pips price will move in /either/ direction right? I don’t quite get how the curves can be applied to just TP. eg. if we want to know the probability of TP of +40 pips in 24hrs, yes the curves do give a probability of 82%, but wouldn’t it be 40 pips in either direction? ie. 41% of +40 pips & 41% of -40 pips? (because I’m assuming the curves have no drift, a walk in either direction is equally likely, etc.) Maybe I’m missing something – apologies if it’s a dumb question. Thanks!

No only in one direction. The maximal curve will give the probability of a maximum point being reached, or equally if you apply the formula on the other side, to a minimal point being reached. When symmetric as you say, it is just mirrored.

So for eg: P(Z>+40 pips) gives an independent probability only of the price moving above the +40 pips level. It says nothing about the price falling say 200 pips below, this is why there is a separate case for the SL point.

With no drift, yes it would be the same (41% for a move either side).

(apologies again, I’m a bit slow) let’s see if I got this. The SL is a separate case.

So just considering the TP, what the maximal curve shows is P(Z>+40pips) + P(Z+40pips) = 41% ?

Not quite. What the maximal curve basically shows is the probability of a high-watermark being reached – and that applies for a certain time period only. So say you want to know the probability of the price going +40 pips or higher within 24 hours. That’s P(Z>+40 pips) from the 24-hour curve & it’s 82%. After 1 hour, its 28% (thereabouts, I am just looking at chart not in Excel.)

Thanks for your patience Steve 🙂

It was probably my fault, but my previous comment was strangely truncated. What I wrote was to ask if the maximal curves show: P(Z>+40pips) + P(Z+40pips)=82%. If so, doesn’t that also imply P(Z<-40pips)=82%, which surely cannot be? I'm lost here.

You are welcome.

I have to answer here because its not possible to add a reply any deeper (it will be better to continue this in Forum section where there is more room.):

byo2000:

–What I wrote was to ask if the maximal curves show: P(Z>+40pips) + –P(Z+40pips)=82%.

There is no addition here (did you mean P[Z< -40pips]? ). For example, if I want to know after 24-hours, what the probability of price rise >40pips, it gives this as 82% from the curve. This tells me only one thing in isolation: that the TP has 82% chance of being struck.

byo2000

— If so, doesn’t –that also imply P(Z<-40pips)=82%, which surely cannot be? I'm -- lost here. Sure this is possible! These are not mutually exclusive events so the probability does not have to add up to 1. For example, you can have probability it rains today 70%. Probability its is sunny today 85%. These can happen together, they don't have to add to 1. You can have the price rising then falling in which case it passes a TP AND SL. For eg. If you have very close TP/SL then these have near 100% chances of being hit. If you imagine a space of outcomes you have p(SL only hit) P(TP only hit) P(SL and TP hit) P(Neither TP nor SL hit) Sum = 1 So say you want to know P(TP only hit), or P(TP hit first) or whatever you have to separate out these into mutually exclusive cases. That is what your first question was. Hope that explains it!

Very cool idea & great article! I have some questions. In Step 3, can you explain how you got the table for p(win), p(loss), p(open)? Thanks!

Sure. It’s standard probability theory:

Say p(wl) = P(price hits SL & TP)

P(wl) = p(TP hit) x p(SL hit)

p(win first) = p(TP hit) x p(wl) / ( p(TP hit) + p(SL hit) )

p(lose first) = p(SL hit) x p(wl) / ( p(TP hit) + p(SL hit) )

p(win)=p(TP hit) – p(lose first)

p(lose)=p(SL hit) – p(win first)

P(open)=1-p(win)-p(lose)

Thanks Steve. I love your articles.

Could you commend on reversal moves? Trades such as EURAUD on 20 Feb hit a low of 1.4385 and spiked upwards to 1.4583.

100-200 pips reversed moves can be pretty tough psychologically to place stops – where you don’t want them too close, yet when it hits SL it erased off those hard earned gains or puts one in steeper losses.

I was in some other trades that reversed off its lows. As I read your posts, I know we are going down to really precise levels now. That -100+ stoploss can take place in a very short span of time and hurt quite a bit if one’s position is in several trades at the same time.

EUR/AUD is quite a volatile pair, with about 50% higher volatility than EUR/USD at the moment.

That is for a 1 day trade, for the short side I would use a ratio somewhere around TP=56/SL=250. Are you trading the long or short side because it really makes a difference here. On the buy side there’s very high swap rate (-3.13%) to take into consideration.

Reversal moves are all part of the normal daily volatility in the markets. I’m of the view that it’s better to have a lower leverage so that these events can be withstood – because in the scheme of things a 100-200 pip move is pretty insignificant really.

Thanks. I was thinking through my mistakes, and reading your spreadsheets. Essentially the trades I got stopped out was GBPUSD, GBPCAD, EURCAD. It is trade timing.

SL=250 is tough psychologically (I am not going to be able to test 200 plus pips.)

Actually some profit from the EURAUD, EURNZD. I trade several illiquid pairs gbpnzd and also trade short side for some pairs, and hedge sometimes as well.

I will look through the win loss ratios, and trades probabilities to examine the trades and see if I can improve on where it went wrong. You have got a great resource. I was already doing breakouts, grid trading, carry trades for some time, but I still come back because everything was very well written and learn from someone who is strong.

Could you write an article on basket trading? I have been practicing, don’t know if this is something doable on a live account.

nice idea! thanks steve, i will try this out and see how it works.