Why fixed lots fail across symbols
0.10 lots means something different on every instrument. A 0.10 lot position in a CFD index has a completely different loss profile from 0.10 lots in gold or in a forex pair, because contract size and tick value differ. An EA hardcoded to 0.10 lots is over-risking on some symbols and under-risking on others, and the trader usually has no idea which.
The three numbers
SYMBOL_TRADE_TICK_SIZE— the smallest price increment the broker quotes.SYMBOL_TRADE_TICK_VALUE— money gained or lost per tick, per one lot, in deposit currency.SYMBOL_TRADE_CONTRACT_SIZE— units of the underlying per lot.
Note that _Point and tick size are not always the same. Some brokers quote an extra digit, so one point may be several ticks. Converting stop distance from points into ticks before multiplying by tick value is the step that most sizing bugs skip — and it produces positions that are wrong by a factor of ten.
The formula
Risk per lot equals the stop distance expressed in ticks, multiplied by tick value:
riskPerLot = (stopDistance / tickSize) * tickValue lots = riskMoney / riskPerLot
Then clamp to the symbol's volume minimum, maximum, and step — and round down, never up.
Check margin before you send
OrderCalcMargin tells you what the position will require. Compare it to free margin and stand down if it does not fit. With leverage, a position can be size-correct for risk and still be unaffordable.
Respect stops and freeze levels
SYMBOL_TRADE_STOPS_LEVEL is the minimum distance for SL/TP; SYMBOL_TRADE_FREEZE_LEVEL is how close to the market you may modify an order. If your risk-based stop lands inside the stops level you have a choice: widen the stop and cut the size, or skip the trade. The correct answer is almost always to cut the size — widening the stop to fit a fixed lot count silently doubles your risk.
Swap is a cost, not a footnote
On CFD positions held overnight, swap compounds. A backtest that ignores it will overstate returns on multi-day holds. Check SYMBOL_SWAP_LONG and SYMBOL_SWAP_SHORT and include realistic financing in the tester.