Module 03 · Risk engineering · Lesson 10
Position sizing from the stop
Decide the stop first, then size the trade so hitting that stop costs a fixed slice of the account.
6 minute read
Risk per trade is a choice, lot size is the result
Choose how much of the account a single trade may lose — many educators suggest 0.5% to 1%, and above 2% losing streaks become hard to survive. The stop distance comes from your rules. The lot size is whatever makes "stop hit" equal "risk amount".
Example: 10,000 account, 1% risk = 100. Stop 50 pips on EURUSD, where one standard lot is worth about 10 per pip: 100 ÷ (50 × 10) = 0.20 lots.
double LotsForRisk(double stopDistance)
{
double riskMoney = AccountInfoDouble(ACCOUNT_EQUITY) * InpRiskPercent / 100.0;
double tickValue = SymbolInfoDouble(_Symbol, SYMBOL_TRADE_TICK_VALUE_LOSS);
double tickSize = SymbolInfoDouble(_Symbol, SYMBOL_TRADE_TICK_SIZE);
if(tickValue <= 0 || tickSize <= 0 || stopDistance <= 0) return(0);
double lots = riskMoney / (stopDistance / tickSize * tickValue);
double step = SymbolInfoDouble(_Symbol, SYMBOL_VOLUME_STEP);
lots = MathFloor(lots / step) * step; // round DOWN, never up
if(lots < SymbolInfoDouble(_Symbol, SYMBOL_VOLUME_MIN)) return(0); // too small: skip
return(MathMin(lots, SymbolInfoDouble(_Symbol, SYMBOL_VOLUME_MAX)));
}
Round down, and skip when you cannot size
If the correct size is below the broker's minimum lot, the honest answer is to skip the trade, not to trade the minimum and quietly risk more than planned.
Losing streaks are normal
Even a rule set that wins half the time will, over 200 trades, more likely than not produce a run of seven losses in a row (about 54% at a 50% win rate). At 1% risk that is roughly a 7% dip. At 5% risk it is about 30%. Size for the streak you will certainly meet, not the average trade.
Takeaways
- Stop first, then size from risk %.
- Round lots down; skip if below minimum.
- Size for losing streaks, which are normal.
Primary references
Your rules, our teaching. MarketPanda provides no strategy, no settings that “work” and no signals. Everything here is education; nothing is a recommendation to trade.
Content source: Bundled MarketPanda content.