OPEN-SOURCE SCRIPT
Position Size Calculator

A simple on-chart position sizing tool. Enter your account size and risk percentage, click your stop-loss (and optionally a target) directly on the chart, and the table shows the position size that keeps your loss at the chosen risk amount if the stop is hit.
How it works
Position size = (account size x risk %) / distance between entry and stop. Entry defaults to the current price, or can be set manually. If a target is set, the reward-to-risk ratio is also displayed. Stop and target levels are drawn on the chart, and the table position is configurable.
Notes and limitations
Sizes are expressed in instrument units; for forex, convert units to lots according to your broker's contract size, and note that P&L currency conversion is not performed. Fees, slippage and gaps are not modeled — a stop-loss order does not guarantee the stop price in fast markets. This is a calculation aid, not trade advice.
How it works
Position size = (account size x risk %) / distance between entry and stop. Entry defaults to the current price, or can be set manually. If a target is set, the reward-to-risk ratio is also displayed. Stop and target levels are drawn on the chart, and the table position is configurable.
Notes and limitations
Sizes are expressed in instrument units; for forex, convert units to lots according to your broker's contract size, and note that P&L currency conversion is not performed. Fees, slippage and gaps are not modeled — a stop-loss order does not guarantee the stop price in fast markets. This is a calculation aid, not trade advice.
Open-source script
In true PulseWire spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by PulseWire. Read more in the Terms of Use.
Open-source script
In true PulseWire spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by PulseWire. Read more in the Terms of Use.
