Tools / Position sizer
Position sizer
Turn account size, risk per trade and stop distance into a position you can actually place.
size = (equity × risk%) / |entry − stop|
- Position size (units)
- Notional
- Leverage needed
- Risk if stopped
- Incl. fees
- Reward : risk
- Break-even win rate
Losing streaks at this risk. Consecutive stop-outs compound against current equity.
| Losses in a row | Drawdown | Equity left |
|---|
The rule behind it
Size = (equity × risk%) ÷ |entry − stop|. Fixing the risk per trade, rather than the position size, means a wide stop gets a small position and a tight stop a larger one, so every trade costs about the same when it fails. Using a multiple of ATR as the stop distance makes position size shrink automatically when the market gets more volatile.
Fees are charged on both entry and exit notional. If the leverage needed is higher than your venue allows, widen the stop less, risk less, or skip the trade.
The theory is in the lesson.
Turn this into a tool you own
A spec is not a trading system. Paste this into your coding agent and AgenKit runs a specialist team — architecture, test-first build, risk gates, review — with paper trading on by default.
/agenkit build a risk-gated order router that sizes every order from account equity, risk per trade and stop distance, enforces max leverage and daily-loss limits, and rejects orders that breach them, with paper trading by default- npx agenkit install engineering-kit in your project
- Paste the command into your agent and approve each phase
- Get tests, backtest, risk controls and a paper-trading switch