Skip to content
All library documents

Risk-Based Position Sizing with Broker Limits and Drawdown Controls

Article MQL5 articles

Summary

This article upgrades a moving-average crossover Expert Advisor from fixed lots to position sizing based on a chosen share of account balance and the distance to an ATR-based stop. It estimates the loss per lot from stop distance, tick size, and tick value, then divides the intended monetary risk by that estimate. This makes position size respond to changing volatility and account balance while keeping the planned loss at the stop approximately tied to the selected risk percentage.

The framework also checks stop distances and volumes against broker constraints, including minimum stop levels and minimum, maximum, and step-size rules. An optional drawdown layer reduces risk when equity falls from a peak, and execution is consolidated so buy and sell orders use consistent checks. The article recommends validating expected stop losses and broker rounding in the Strategy Tester. Its sizing estimate depends on accurate symbol properties and a stop being effective as assumed; the article presents an implementation framework, not independent evidence of profitability or guaranteed realized loss limits.

Key ideas

  • Fixed lot sizes do not adjust exposure for account balance or changing stop distance.
  • Risk-based sizing derives volume from intended account risk and estimated monetary loss per lot.
  • Tick size, tick value, and ATR-based stop distance are used to estimate loss per lot.
  • Broker stop-distance and volume rules must be applied before sending an order.
  • An optional equity drawdown control reduces risk after losses, and sizing behavior should be checked in the Strategy Tester.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.