# Calculating stop loss from known values

17

Hi all,

Sorry for the probably terrible title, end of the day couldn't think of anything better.

I'm in the process of setting up a spreadsheet and need a calculation for the stop loss (in points).  The information I have is the \$ per point, Ask Price, Risk % (%3 of equity in this case), trade volume and spread.  Example data below;

 \$ Per Point 0.76644 Ask Price 1.30452 3% Risk 299.94 Volume 0.02 Spread 23

Based on this information, I need to get, in points, a stop loss value which is ~\$299 in loss value higher/lower than the ask price.

I thought I could get this to work using the following;

Points = ( [3% Risk] / [Volume] ) * [\$ Per Point]

Stop Loss = [Ask Price] + ( Points * 0.00001)

However this only seems to work where the \$ Per Point is > 1.

I didn't think this would be terribly difficult until I started attempting it, no matter what I try I cannot seem to come up with the correct numbers.  It's probably something really simple but anyone with an idea please let me know.

Moderator
8422

Hello you can use Tickvalue in the base currency but you did not specify any language.

If it's MQL4 then

```int SL=100;

17

Hi Marco,

This was in a spreadsheet, not in MQL4 or 5.  The whole idea is that the stop loss is unknown until it is calculated, so the above wouldn't work.

1945

Points = ( [3% Risk] / [Volume] ) * [\$ Per Point]

Stop Loss = [Ask Price] + ( Points * 0.00001)

First let me say that I have a number of different ways to calculate SL, none of which include volume. That's something I've never come across before.

I usually figure SL first based upon something like ATR, FIXED, price percent, high/low of last N bars, etc.

Now that I have a SL, I determine the lotSize. It's only at that point that I consider a Risk % — and that's based upon equity.

So, if I have \$10,000, then 3% of that is \$300. But if my equity increases to \$11,000, then 3% is now \$330.

So, on a long-term trend following system, I might have a SL of something like 2xATR(20). Then I figure the lotSize based upon that, my equity, and my max risk percent.

17

It just made sense to me that your stop loss value is going to change depending on the lot size, buying in a lot 1 is going to need a lower value stop than buying in at 0.1 if you want to maintain a 3% risk margin.  I ended up figuring it out anyway, had the point calculation quite wrong, and didn't realise I'd have to change it slightly for different markets.  End result works really well though.