Cash-Risk Position Sizing with Volume-Grid Checks in MT5
Summary
This document describes a read-only MetaTrader 5 diagnostic for sizing a hypothetical trade to a cash-risk budget. It estimates the loss on one lot between an entry and stop with the terminal’s profit calculator, subtracts a user-entered reserve for costs, then divides the remaining budget by that loss. The resulting size is floored to the broker’s volume increment and recalculated to check the estimated loss against the budget.
Reports include the inputs, estimated losses, final volume, and relevant broker limits. Startup checks exercise volume-floor cases, while runtime checks block unsafe or unavailable inputs such as a missing stop, invalid volume metadata, a failed profit calculation, or a budget too small for the minimum size. A passing result covers estimated price loss plus the stated reserve only. It does not ensure execution price, actual costs, margin availability, or order acceptance, and it neither aggregates portfolio exposure nor sends orders.
Key ideas
- Estimate one-lot loss in the account’s deposit currency using the chosen entry and stop.
- Subtract a cash reserve for assumed fees or slippage before calculating position size.
- Floor the calculated size to the broker’s volume grid, then recalculate the estimated loss.
- The diagnostic blocks when required inputs or broker and terminal conditions cannot be validated.
- A passing check does not guarantee fills, actual costs, margin availability, or portfolio-level risk.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.