Skip to content

Trading tool · Position sizing

Build a position size calculator that never rounds your risk up.

A position size calculator built with Super Algo Kit turns the amount you choose to risk on a trade into a quantity the venue accepts. It divides your risk amount by the loss per unit at your stop, rounds down to the lot step and applies margin and exposure caps. It is a grade N tool, judged on correctness alone.

strategy facts

Position-size calculator from risk per trade and stop distance

Kind
A sizing tool with no performance claim
Markets
Equities, futures, options, forex, CFDs, crypto spot and crypto derivatives
Timeframe
Any: it runs before each order
Evidence grade
N: a tool, tested for correctness rather than results
Status
Literature: described in published work, untested by the kit
Core formula
Quantity equals the risk amount divided by the loss per unit at the stop, rounded down to the lot step
Your inputs
You choose the risk per trade and the stop level; the tool has no defaults for either
Data needed
Venue contract specs, tick value, lot step, margin rate, exchange rates and the pack's costs

From the kit's own card. Not investment advice.

Paper first

Test it before you trade it.

Super Algo Kit runs inside the coding agent you already use. It interviews you, writes the spec with pass marks set first, then builds, backtests and paper-tests. Real money starts only when you type the authorize command.

Type this in your coding agent
Build me a position size calculator for my MT5 forex pairs that risks a fixed amount per trade and rounds down to the lot step. Paper only.

The plan, step by step

Tick them off as you go.

How a position size calculator sizes a trade

You choose two things: how much to risk on the trade and where the stop goes. The tool calculates the loss per unit at the stop, including expected exit costs, and divides your risk amount by it. The result is rounded down to the lot step, then checked against margin and exposure caps.

Consistent sizing keeps any single loss inside your plan and avoids the most common retail error, size chosen by feel. Full Kelly sizing assumes the edge is known exactly, so it over-bets on an estimate. The kit caps any Kelly-based size at a fraction and prefers fixed risk.

Position sizing rules in plain words

The calculator only does arithmetic. You set the inputs that matter.

  • Inputs: equity, risk per trade, entry, stop and the instrument's specs.
  • Loss per unit: stop distance times value per point, plus exit costs.
  • Quantity: risk amount divided by loss per unit, rounded down.
  • Caps: available margin, maximum exposure and leverage, and open risk.
  • Outputs: quantity, notional, margin, loss at the stop and warnings.

Where position sizing goes wrong

Most sizing errors come from the instrument, not the maths. Contract multipliers, pip values that differ by quote currency and CFD contract sizes that differ by broker all change the value per point. A stale exchange rate does the same for a foreign-currency instrument.

Two other errors break the risk limit quietly. Rounding up instead of down overshoots on every trade. Sizing each trade alone ignores several correlated positions open at once.

How Super Algo Kit tests a position size calculator

Grade N tools are tested for correctness. The kit writes golden test cases for an index future, a currency pair, a crypto perpetual and an option. Each is checked against the broker's own calculator. Property tests prove the quantity never exceeds the risk limit after rounding and that caps always apply.

Before any order, you see the loss at the stop in money. Inside a bot, an independent risk gate still enforces order size, position and daily loss limits on top of the calculator.

Before you rely on it

Where it fails.

  • Wrong value per point: multipliers, pip values and CFD contract sizes differ.
  • Rounding up instead of down breaks the risk limit on every trade.
  • A stale exchange rate mis-sizes foreign-currency instruments.
  • Gaps through the stop make the real loss larger than planned.
  • Full Kelly on a backtest's edge estimate over-bets.
  • Sizing trades one at a time while correlated positions are open.

FAQ

Position-size calculator: questions.

How do you calculate position size?

Position size is the amount you will risk divided by the loss per unit at your stop, including exit costs. Super Algo Kit rounds the result down to the lot step, then applies margin and exposure caps. You choose the risk amount and the stop; the tool only does the arithmetic.

What is a lot size calculator for forex?

A forex lot size calculator converts your risk and stop distance into lots, using the pair's pip value in your account currency. Pip values differ by quote currency, and CFD contract sizes differ by broker. Super Algo Kit checks its position size results against your broker's own calculator.

Should I use the Kelly criterion for position sizing?

Full Kelly position sizing assumes you know your edge exactly, and a backtest only estimates it, so it over-bets. Super Algo Kit caps any Kelly-based size at a fraction and prefers a fixed risk per trade.

Why can a trade lose more than the planned risk?

Price can gap through the stop, so the real loss exceeds the planned risk. Correlated positions open at once can also stack losses. Super Algo Kit adds an open-risk cap across positions, and its risk gate halts trading at daily and weekly loss limits.

Does Super Algo Kit choose my risk per trade?

No. You choose the risk per trade and the stop level, and the position size calculator has no default values for them. Super Algo Kit sets its wider risk limits from your own stated maximum loss.

Keep reading

More guides.

Sources the kit's card cites

  • Kelly (1956). A New Interpretation of Information Rate. Bell System Technical Journal.
  • Carver (2015). Systematic Trading. Harriman House.

Build it with Super Algo Kit.

15 specialist roles and 35 skills inside your coding agent. Paper first, live only when you say.

Super Algo Kit is development software. It is not investment advice, a signal service or a promise of performance. Trading involves substantial risk, including the loss of all capital you trade with.