Risk-Based Lot Sizing Across Forex and Other Instruments
Summary
The document describes a script for calculating a position size from either a percentage of account value or a fixed risk amount and a user-entered stop-loss distance. For forex, it adjusts a four-digit pip input for five-digit broker quotes. For non-forex products such as commodities, indices, and stocks, the user enters the stop in points. The script also observes the broker’s minimum and maximum lot constraints.
An alert reports the calculated size, risk and estimated loss amounts, and instrument tick size and value; for forex it also shows the converted stop distance. The document notes a correction to non-forex calculations and illustrates that brokers can use different volume steps for the same index. It does not explain the calculation formula, treatment of currency conversion or fees, or validation across instruments. Users should understand those assumptions before relying on the result as a complete risk estimate.
Key ideas
- Position size is calculated from either percentage-based risk or a fixed risk amount and a stop distance.
- Forex stop inputs are adjusted for five-digit quoting, while non-forex stops are entered in points.
- The script respects broker minimum and maximum volume limits and reports tick data and estimated loss.
- Different brokers can impose different volume increments for the same instrument.
- The description does not specify all calculation assumptions or account costs.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.