When you hoover a stop loss line you get the "stop loss profit" (see image). Is there a way to calculate this or a built in function to get this?
The prupose is to verify that an order got the correct stop loss (so it doesn't risk too much of the trading capital).
Uhm? Yes there is a way to calculate this. And to say the truth, you should be calculating all this before you even enter a trade.
-82 Pips that results into -952.688 € loss is basicly 1 Lot (10 USD ~ 8€) + commission + spread.
The formula to calculate the correct Lot-Size is as follows:
1) You devide your AccountBalance through 100 to get the value of one percent of it. e.g. 5000€ / 100 = 50€.
2) You plan to spent just 1% risk into one trade: 50€ * 1 = 50€
3) You plan to set your stop loss say 60 pips away from where you entered the market. You need to add the spread and commission (e.g. 55pips)
4) You calculate the correct lotValue that you need to enter when opening an order 50€ / 55pips = 0.91€ per pip / 8€ (or 10USD depends on the account) = 0.11 Lot
Also make sure that your chance + risk is around 2:1 means. If you set your stop los 55pips away from entry point, then make sure that you at least return 110pips from that trade. So in worst case it doesn't make sense to risk 55pips if your max return are 20pips because you nail a resistance/support level.
A side note: You never drag your stop loss away from where you planed your trade. E.g. you upen a long position and plan your stop loss to be 55pips away. Then once thet trade goes against you. You never drag the stop loss down to 60-70+ pips to give the trade more room. Either you get stopped or not otherwise your account balance will show 0€ really soon. The only way you drag your stop los is to follow the trend upwards to secure possible earnings.
I do calculate this currently using slightly different formula that uses MarketInfo(Symbol(),MODE_LOTSIZE) , but I noticed that this function gives me wrong values for some markets (so I wanted to have something to verify the calculations).
I'll try the formula that you described instead. Thanks!
Thank you, I will try this method as well. I tried something similar before (but that was using ticksize instead of deltaperlot, and it gave wrong value sometimes).
To add comments, please log in or register