Download MetaTrader 5

MT4 Stop Loss and Take Profit formula

To add comments, please log in or register
Usernamelessss
10
Usernamelessss  
Hello all, 

I'd like to know which is the exact formula (used by brokers) to calculate preventively the monetary value of a SL or a TP. 

I'll explain better: if I set a pending order or I send an order to the market and I put mouse over my SL or TP level, the platform says me how much (in deposit currency) I will win or I will lose if the price reach one of those levels. 

I made my personal Position Size Calculator indicator, but I couldn't find the exact formula used by the platform. 

Ty to everyone who will reply

Fernando Carreiro
2839
Fernando Carreiro  
Usernamelessss: I'd like to know which is the exact formula (used by brokers) to calculate preventively the monetary value of a SL or a TP. I'll explain better: if I set a pending order or I send an order to the market and I put mouse over my SL or TP level, the platform says me how much (in deposit currency) I will win or I will lose if the price reach one of those levels. I made my personal Position Size Calculator indicator, but I couldn't find the exact formula used by the platform.

This question has been asked so many, many, many times that it has become rather tedious for us to keep explaining it over and over again.

Please do a search here on the Forum and the CodeBase, because you are guaranteed to find the answer repeated several times.

EDIT: Looks like @whroeder1 was generous enough to answer your query without you needing to trouble yourself with searching for it!

whroeder1
15902
whroeder1  
Usernamelessss: I put mouse over my SL or TP level, the platform says me how much (in deposit currency) I will win or I will lose if the price reach one of those levels.
Risk depends on your initial stop loss, lot size, and the value of the pair.
  • You place the stop where it needs to be - where the reason for the trade is no longer valid. E.g. trading a support bounce the stop goes below the support.
  • Account Balance * percent/100 = RISK = OrderLots * (|OrderOpenPrice - OrderStopLoss| * DeltaPerLot + CommissionPerLot) (Note OOP-OSL includes the SPREAD, and DeltaPerLot is usually around $10/pip but it takes account of the exchange rates of the pair vs. your account currency.)
  • Do NOT use TickValue by itself - DeltaPerLot
  • You must normalize lots properly and check against min and max.
  • You must also check FreeMargin to avoid stop out
Most pairs are worth about $10 per PIP. A $5 risk with a (very small) 5 PIP SL is $5/$10/5=0.1 Lots maximum.
Usernamelessss
10
Usernamelessss  
Fernando Carreiro:

This question has been asked so many, many, many times that it has become rather tedious for us to keep explaining it over and over again.

Please do a search here on the Forum and the CodeBase, because you are guaranteed to find the answer repeated several times.

EDIT: Looks like @whroeder1 was generous enough to answer your query without you needing to trouble yourself with searching for it!

I searched  many, many, many times this topic and I did many, many, many attempts. But I didn't reached what I was looking for. So I asked here. 


whroeder1:
Risk depends on your initial stop loss, lot size, and the value of the pair.
  • You place the stop where it needs to be - where the reason for the trade is no longer valid. E.g. trading a support bounce the stop goes below the support.
  • Account Balance * percent/100 = RISK = OrderLots * (|OrderOpenPrice - OrderStopLoss| * DeltaPerLot + CommissionPerLot) (Note OOP-OSL includes the SPREAD, and DeltaPerLot is usually around $10/pip but it takes account of the exchange rates of the pair vs. your account currency.)
  • Do NOT use TickValue by itself - DeltaPerLot
  • You must normalize lots properly and check against min and max.
  • You must also check FreeMargin to avoid stop out
Most pairs are worth about $10 per PIP. A $5 risk with a (very small) 5 PIP SL is $5/$10/5=0.1 Lots maximum.

Really thanks for your explanation. I use the same way to calculate orders lots, but now I learned how to normalize lots. And now it seems works fine. 

To add comments, please log in or register