Position risk sizer
Computes position size from account equity, a risk percent, and stop distance. Use when the user asks how large a position should be or for a lot or unit size from a fixed risk.
Size a position so a stop-out loses a stated fraction of equity. Use scripts/size_position.py. This is arithmetic, not a recommendation to take the trade.
Steps
- Collect equity, risk percent, stop distance in price units, and cash value of a 1.0 price move per unit (or per lot). If any input is missing or not positive, stop and ask. Do not assume a lot size.
- Run
python3 scripts/size_position.pywith those flags. Risk cash is equity times risk percent. Units are risk cash divided by stop distance times value per unit. - Show the inputs, the risk cash, and the unit size. Round the way the user asks; otherwise keep four decimal places for units and two for cash.
- State the assumption in one line: the stop is the exit, and costs are not included unless the user added them to the stop distance.
- Validate by recomputing risk cash independently and checking that units times stop times value per unit equals that risk cash, within rounding. Do not place an order.
Example
User: Equity 10,000, risk 0.5 percent, stop 25 pips, and each pip per lot is worth 1.
Agent: Runs the script with --equity 10000 --risk-pct 0.5 --stop 25 --value-per-unit 1. Reports risk cash 50.00 and size 2.0000 units. Assumption: costs are not in the stop. No order is placed.
Boundaries
Do not raise the size to hit a profit target. Do not size a trade with no stop. Do not claim the stop will be filled at that price.
Lint report
Score 100. 0 errors, 0 warnings, 0 notes.
skill-lint reported no errors, warnings, or notes.
See also
- trade-desk, the agent that bundles this skill
- MT5 trade journal Trading & markets
- Market data briefing Trading & markets
- Session plan Trading & markets
- Prop firm rule check Trading & markets
- Event risk guard Trading & markets
References
- Source path skills/trading/position-risk-sizer
- SKILL.md 1.9 KB
- scripts/size_position.py 1.2 KB
- Raw SKILL.md
- Download the skill folder
- Agent Skills specification