BullsEdges algo trading guide: A step-by-step method to calculate lot size from your risk percentage and stop distance, with worked examples for forex pairs and gold.
Deciding to risk 1% per trade is easy. Turning that into the right lot size for each trade is where most traders guess. Here is the method.
BullsEdges algo trading application: Derive lot size from the stop distance and available risk budget, then round to the broker's permitted volume step.
The formula
Lot size = Money at risk / (Stop distance x Value per unit per lot)
You need three numbers:
- Money at risk: account balance x risk percentage.
- Stop distance: from entry to stop loss, in pips or dollars.
- Value per unit per lot: how much one lot gains or loses per pip (forex) or per $1 (gold).
Example 1: EURUSD
- Balance: $10,000, risk 1% = $100.
- Stop: 25 pips.
- Value: about $10 per pip per standard lot.
Lot size = 100 / (25 x 10) = 0.40 lots.
Example 2: XAUUSD
- Balance: $5,000, risk 1% = $50.
- Stop: $6 below entry.
- Value: 1 lot = 100 oz, so $100 per $1 move.
Lot size = 50 / (6 x 100) = 0.083, rounded down to 0.08 lots.
Example 3: a small account
- Balance: $300, risk 1% = $3.
- Stop: $6 on gold.
- Minimum lot: 0.01 = $1 per $1, so $6 of risk.
Even the smallest lot risks 2% here. Either accept a higher risk, use a tighter stop (if the strategy allows it), or wait until the account is larger. This is how minimum lot sizes force small accounts into high risk - and why strategies that add positions, like grids, can be impossible to run safely on small balances.
Round down, not up
Always round the lot size down to the broker's lot step. Rounding up quietly increases risk on every trade.
Volatility-based sizing
If the stop is based on ATR, the stop distance changes with volatility, and the formula automatically makes positions smaller in wild markets and larger in calm ones. That keeps the money at risk constant, which is the whole point.
What about multiple positions?
If a strategy can hold several positions at once - or you run several strategies - the risk adds up. Five correlated trades at 1% each behave like a 5% trade. Set a maximum total risk across all open positions.
Let the EA do it
Most good Expert Advisors offer a risk-percent input that runs this calculation for every trade. Check that it:
- Uses the actual stop distance of each trade.
- Uses the correct contract size for the symbol.
- Respects minimum, maximum and step sizes.
BullsEdges takeaway for algo trading
Sizing is where risk management becomes real. A good stop is useless if the lot size turns a 1% plan into a 10% loss.
Trading forex and gold carries a high level of risk and may not be suitable for every investor. Past performance and backtests do not guarantee future results. This article is education, not financial advice.
