FX Nova Bot — Custom Trading Bot Development
MONEY MANAGEMENT / POSITION SIZING / RISK ENGINE

Position Sizing by Risk: From Stop Distance to Trade Volume

Position size should be the output of the risk model, not the starting point. Define the loss budget, measure the stop distance, read the instrument specification and calculate a volume that stays inside the risk envelope.

10 MIN READRISK MANAGEMENTENGINEERING NOTES

Start with money at risk, not lot size

The lesson repeatedly starts with a maximum loss in account currency or as a percentage of equity. The stop distance is determined by the trade structure; the position size is then chosen so that a stop-out remains close to the predefined loss budget.

1. Risk budget

Define the maximum amount the trade is allowed to lose.

2. Stop distance

Measure the distance from entry to the protective stop.

3. Instrument value

Use the broker's tick size, tick value and contract specification.

4. Position size

Calculate volume from risk, distance and value per price increment.

The transcript's simplified examples

One example uses a $4,500 account, a $100 risk budget and a 35-pip stop, producing approximately 0.29 lots under the lesson's assumed $10-per-pip convention. Another example defines risk as 1% of $4,500 ($45) with a 28-pip stop.

Those examples are useful for understanding the relationship between risk and stop distance, but the shortcut risk ÷ stop ÷ 10 is not universal. The value of a pip or tick changes with symbol, contract size, quote currency, account currency and broker specification.

A production-safe sizing formula

risk_money = equity × risk_percent loss_per_lot = (stop_distance / tick_size) × tick_value_per_lot raw_volume = risk_money / loss_per_lot volume = floor_to_step(raw_volume, volume_step) validate: volume >= min_volume volume <= max_volume margin_required <= free_margin estimated_loss_at_stop <= risk_money

For MT5, the implementation should read symbol properties dynamically rather than assume that every instrument behaves like a major FX pair. For exchange APIs, equivalent contract and quantity rules should be taken from the venue's symbol metadata.

Why risk percentage is useful

The source favors small predefined risk and warns against oversized positions and trading without protective stops. A percentage model also scales the monetary risk with account equity. The specific percentage remains a strategy parameter rather than a universal rule.

Slippage and execution are part of risk

The transcript acknowledges small deviations caused by slippage. A production risk engine should go further: account for spread, commission, price gaps, minimum volume increments and the fact that a stop order does not guarantee an exact fill price.

Make the calculator inspectable

A useful bot should log the inputs that produced every size: equity, configured risk percentage, stop distance, tick size, tick value, raw volume, normalized volume and estimated stop loss. This makes the calculation auditable when live execution differs from a backtest.

Important: This article is an engineering interpretation of educational trading material. It is not investment advice, a trading recommendation or a guarantee of results. Position sizing must use the actual instrument specification supplied by the broker or exchange.
CUSTOM DEVELOPMENT

Want these rules automated?

FX Nova Bot can translate explicit position-management and risk rules into MT5/MQL5 or Python logic with testable states, logging and safeguards.

Discuss Your Project →
FX Nova Bot
MT5 • Forex • Crypto