Skip to content
← Learning hub
Engineering / Tutorial

When the minimum lot breaks your risk budget

Why rounding up to the minimum lot can violate a risk budget, and how to specify safer position sizing.

Edge Quant editorial · 28 October 2026 · About 5 minutes

A strategy can calculate the right risk budget and still submit the wrong position size. The problem often appears at the last step: rounding a theoretical position to a broker’s permitted volume.

Published 3 November 2026. Original educational analysis with hypothetical arithmetic. No historical backtest, broker execution or compiled MQL5 test is claimed.

Start with cash loss, not a convenient lot size

Suppose an account has $1,000 of equity and a strategy allocates 0.5% to a new trade. Its planned cash-loss budget is $5. This is a research assumption, not a recommendation. Position sizing needs an estimate of the loss between the intended entry and stop, expressed in the same currency as that budget.

In MQL5, OrderCalcProfit estimates a trade’s profit or loss from a supplied order type, symbol, volume, opening price and closing price. It returns the estimate in account currency and reports whether the calculation succeeded. Use a valid reference volume and the proposed stop price as the closing price; if calculation fails, stop the sizing process rather than substituting a guessed value. Source checked 3 November 2026: MetaQuotes OrderCalcProfit reference.

A small account can make a valid setup untradeable

Consider a hypothetical instrument where one lot would lose $800 from entry to stop. Assume the estimate scales linearly with volume over the sizes considered. Ignore costs temporarily to isolate rounding. The theoretical volume is $5 / $800 = 0.00625 lots. If the smallest permitted volume is 0.01 lots, submitting the minimum would expose $8 to the modeled stop loss: 60% more than the $5 budget.

The correct response under a hard $5 budget is to skip this trade. Increasing volume to the minimum is a change to the risk policy, even if the platform accepts the order. Moving the stop closer simply to fit the budget also changes the strategy’s exit rule and should not happen silently.

Round down, then calculate again

For an illustrative volume grid of 0.01, 0.02, 0.03 lots and so on, a raw size of 0.026 lots becomes 0.02 lots under downward rounding. It must not become 0.03. Do not assume every instrument uses this grid: read the permitted minimum, maximum and increment for the actual symbol and validate the resulting order.

A useful sizing sequence is: compute the cash budget; estimate loss at a valid reference volume; derive a candidate; round down to a permitted size; reject candidates below the minimum; and recalculate the candidate’s cash loss. The final recalculation catches rounding and unit mistakes before an order is sent. Keep explicit checks for non-finite values, zero stop distance, invalid stop direction and missing symbol information.

Costs belong inside the budget

Suppose a candidate has $4.60 of modeled price loss and $0.80 of assumed round-trip execution costs. Its planned total is $5.40, not $4.60. A $5 policy would reject or reduce it. These invented costs are not a broker quote. Build a separate cost model appropriate to the instrument, and avoid counting spread twice if it is already reflected in the entry and exit prices.

A stop price is not a guaranteed fill price. Gaps and slippage can make realized loss exceed the planned amount. Label the output “modeled loss at stop,” not “maximum possible loss.” Also distinguish risk capacity from margin capacity: passing one check does not establish the other.

Record skipped trades as research outcomes

Log the raw size, permitted size, modeled loss, cost allowance and rejection reason. A backtest that permits fractional positions unavailable in the intended account can overstate how faithfully the strategy can be implemented. Compare a theoretical fractional-size run with an executable-volume run using identical signals and costs. Report the number of skipped signals and resulting exposure differences before comparing performance.

Minimum-volume constraints are particularly important when comparing starting balances. A strategy that can express every signal at a larger balance may miss many signals at a smaller balance. That is a different implementation, not simply a scaled equity curve.

A compact acceptance checklist

  • A candidate below the minimum produces no order.
  • Rounding never increases the intended risk allocation.
  • Failed loss calculations produce an explicit rejection.
  • The final candidate is checked again with costs included.
  • Existing positions and pending entries are considered separately before allocating more portfolio risk.
  • Logs distinguish an invalid signal, insufficient risk capacity and insufficient margin.

This article establishes a sizing specification. It does not establish profitability or certify an Expert Advisor. Before deployment, test the implementation with the intended broker’s symbol settings and account currency, then inspect actual order requests in a controlled demo environment.

Primary references

References reviewed 28 October 2026. Original exercises and project-specific observations are identified separately.

Keep exploring

Review drawdown and risk ↗

Educational engineering and research guidance. Examples do not establish a profitable or live-ready trading strategy.