Can anyone help?
I'm backtesting with 5 digit broker data. Have $100,000 starting balance.
Does the equation for my tradesize seem right for using 1% of account balance as risk and 1.5x the ATR for a stop loss? Do I need to do anything to change the stop loss units because I'm using the ATR value ? I'm not concerned with the spread for my backtesting. I will add freemargin check later. I read a bunch of posts here and I'm still not too sure. Some info on my first order:
AccountBalance: 100000.0, 1% of AB: 1000.0, DeltaValuePerLot: 99999.99999999999 1.5x ATR: 0.02680285714285714 lot step: 0.01 tradesize: 0.37
Free Margin: 98144.81 Account Free Margin Check: 96294.81 Margin Mode: 1 Account Lev: 20
Anyone?
Anyone?
Hello,
the formula to calculate stop loss value per trade is:
Stop Loss value = 100 x 100,000 x Lot Size x (Stop Loss In Point * Tick Value) / Account Balance.
For example
Balance = 10,500
Pair = EURUSD
Type Order = Buy
Lot Size = 0.20
Open Price = 1.36150
Stop Loss Price = 1.35600
Tick Value = 1.0
The risk is:
100 * 100,000 * 0.20 * ((1.36150 - 1.35600) * 1.0) / 10,500 = 200,000 * 0.0055 * 1.0 / 10,500 = 1.05%

- www.mql5.com
- 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.
- AccountBalance * 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
and verify that
MODE_TICKVALUE is returning a value in your deposit currency, as promised by the documentation, or whether it is returning a
value in the instrument's base currency.
MODE_TICKVALUE is not reliable on non-fx instruments with many brokers - MQL4 programming forum 2017.10.10
Is there an universal solution for Tick value? - Currency Pairs - General - MQL5 programming forum 2018.02.11
Lot value calculation off by a factor of 100 - MQL5 programming forum 2019.07.19 - 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 or 0.1 Lots maximum.

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Can anyone help?
I'm backtesting with 5 digit broker data. Have $100,000 starting balance.
Does the equation for my tradesize seem right for using 1% of account balance as risk and 1.5x the ATR for a stop loss? Do I need to do anything to change the stop loss units because I'm using the ATR value ? I'm not concerned with the spread for my backtesting. I will add freemargin check later. I read a bunch of posts here and I'm still not too sure. Some info on my first order:
AccountBalance: 100000.0, 1% of AB: 1000.0, DeltaValuePerLot: 99999.99999999999 1.5x ATR: 0.02680285714285714 lot step: 0.01 tradesize: 0.37
Free Margin: 98144.81 Account Free Margin Check: 96294.81 Margin Mode: 1 Account Lev: 20