Trading math / 05
How Do You Calculate Position Size From a Stop Loss?
Divide your cash risk budget by the estimated loss for one lot at the planned stop. Then round down to a volume the broker allows. Equal cash risk on two symbols can produce different lot sizes because the value of a price move and the trading costs differ.
Calculate the loss per lot
- Set the cash risk budget in your account currency. If you use a percentage, multiply your equity by that percentage as a decimal.
- Measure the distance from the expected fill price to the planned stop in pips or ticks. Use the value of one pip or tick per lot in your account currency.
- Multiply the distance by the pip or tick value. Add estimated costs that are outside the modeled price move, including commissions and any extra slippage allowance you are using.
- Divide the budget by this loss estimate. Cap it at the broker’s maximum and round down to the volume grid starting from the minimum. If the minimum lot exceeds the budget, that setup has no permitted size within the estimate.
Raw lot size = cash risk budget ÷ estimated loss per lot.
Worked example for EURUSD and gold
These examples use an illustrative $120 budget, a USD account, and a 0.01-lot minimum and step for each symbol. They assume the expected entry and stop prices already account for the side of the quote used for execution.
| Symbol | Planned move and assumed contract | Loss estimate per lot including costs | Rounded size | Estimated loss |
|---|---|---|---|---|
| EURUSD | 30 pips × $10 per pip per lot | $300 + $7 = $307 | 0.39 lots | $119.73 |
| XAUUSD | $3 per ounce × 100 ounces per lot | $300 + $10 = $310 | 0.38 lots | $117.80 |
The XAUUSD example’s raw size is about 0.387 lots. At 0.39 lots, the estimate becomes $120.90, above the budget. The 0.38-lot size fits under these assumptions. Gold contract sizes and volume rules depend on the broker and the exact symbol.
Confirm the symbol and the account constraints
In MT5, find the exact symbol in Market Watch and open Specification to check its contract size, tick size, tick value and allowed volumes. Convert any profit or loss estimate to the account currency. An EA developer can check the estimated price-move loss in that currency with OrderCalcProfit, using the trade side and expected prices. Check margin separately. Gaps and fills beyond the planned stop can make the actual loss larger than the estimate.
Try the position size calculator with a hypothetical setup. For forex pip inputs, use the pip value calculator.
Watch the short
One Percent Risk on Gold and EURUSD. Should Lot Size Be the Same?
Sources
Discuss it with RealTradeMaster
Compare hypothetical sizing calculations and ask questions about MT5 execution.