Skip to content
All library documents

Position Sizing from Stop Distance, Risk Budget, and Reward Ratio

Article ProRealCode

Summary

The indicator estimates trade risk and position size from an entry price, stop level, account capital, and a chosen risk percentage. It calculates the stop distance as a fraction of entry price, derives a quantity from the amount of capital at risk, and projects a target price using a configurable reward-to-risk multiple. It also displays the estimated risk amount, position value, share count, and potential gain on the chart.

An optional mode adjusts the stop using a 14-period average true range. This provides a volatility-sensitive alternative to the fixed stop input, while the reward multiple and risk budget remain user-configured. The document includes formulas and display logic but no worked examples or validation. Its quantity calculation rounds to a whole number and may not account for fees, slippage, gaps, contract multipliers, lot constraints, or instrument-specific conventions, so its estimates require adaptation before use.

Key ideas

  • Position quantity is derived from the account risk budget and the distance between entry and stop.
  • The target price is calculated by applying a configurable reward-to-risk multiple to the stop distance.
  • An optional ATR adjustment makes the stop level depend on recent volatility.
  • The indicator displays estimated risk, position value, quantity, target level, and potential gain.
  • Rounding and omitted trading costs or instrument rules can make actual risk differ from the displayed estimate.

Tags

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