Learn · Guide

Position sizing for algo traders: the maths that keeps a grid alive

Entries get the glory, but position size decides whether a bad week is a lesson or a funeral. The simple formula, worked examples, and the special maths of grids.

Published 2026-10-24 · Products and prices drawn from the directory listings, last checked Oct 2026 · Educational only — not financial advice.

The only number that decides survival

Ask a room of traders what matters most and you will hear about entries, indicators and strategy edges. Ask the ones still trading five years later and a different answer comes up: position size. Your strategy decides how often you win. Your size decides whether losing streaks — which every strategy has — are survivable.

The good news: the maths is genuinely simple. This guide works it by hand, on purpose. Doing it slowly a few times teaches you what the numbers *feel* like, and it is exactly the maths our upcoming Tools Library position-size and grid-risk calculators will automate.

The core formula

Every sizing decision is the same three steps:

Worked example 1: a currency pair

Account $1,000, risk 1% = $10. Your EA's stop sits 50 pips away. On a major pair, one pip at 0.01 lots is worth roughly $0.10 (an approximation — always confirm your broker's contract spec). Being wrong at 0.01 lots therefore costs 50 × $0.10 = $5. Your budget is $10, so the size is 0.02 lots. No spreadsheet, no drama.

Worked example 2: gold

Account $3,000, risk 0.5% = $15. Your strategy stops out on a $3.00 move in gold. At 0.01 lots you control 1 ounce, so a $3.00 move costs $3.00. Budget $15 ÷ $3 = 0.05 lots. Same formula, different instrument — the only thing that changes is the value of a unit move, which is why "I always trade 0.1 lots" is not a sizing method; it is a habit.

Why grids need different maths

A grid EA does not place one trade. It places a *ladder* — buy orders at intervals as price falls, expecting a bounce. Sizing a grid trade-by-trade is the classic mistake: each level looks harmless, but the risk lives in the whole ladder at once.

Work the honest scenario: price does not bounce. It falls straight through every level and keeps going. With 0.01 lots per level, 20-pip spacing between levels, and price ending 20 pips below the last entry, the floating loss looks like this on a $1,000 account (using the same ~$0.10 per pip approximation):

Levels in the gridTotal sizeFloating loss in the run-throughShare of a $1,000 account
50.05 lotsabout $303%
100.10 lotsabout $11011%
150.15 lotsabout $24024%
200.20 lotsabout $42042%

Notice the shape: doubling the levels roughly *quadruples* the pain, because every new level is both another position and further from the current price. A grid is sized by its worst day, not its average one. Before a grid goes live, three numbers should be written down: the maximum levels it may open, the account loss at which it must stop opening new levels, and the loss at which it closes everything. If the vendor cannot tell you where those brakes are, the brakes do not exist.

Martingale: the multiplier that eats accounts

Some grids increase size as price moves against them — 0.01, then 0.02, 0.04, 0.08, 0.16 lots. The idea is that a small bounce recovers everything. The arithmetic of the idea's bad day:

StepLot sizeTotal positionRunning total loss if price falls through all five levels and 20 pips beyond
10.010.01about $10
20.020.03about $26
30.040.07about $50
40.080.15about $82
50.160.31about $114

Five quiet steps turn a $10 risk decision into a $114 floating loss with the largest position opened at the worst price — and price does not owe anyone a bounce at step five. This is why experienced grid traders who survive tend to cap total basket size, cap the number of steps, or skip multipliers entirely. If a listing on our Expert Advisors & Bots shelf mentions recovery or doubling logic, the notes on its page say so — read them before the marketing.

Habits that keep the maths honest

Stackbot's house rule: I never ask "how much can this make?" first. I ask "how much is left if it's wrong?" — the strategy can answer the other question later.

The honest summary

Risk amount ÷ distance × value — that is the whole formula, and it fits on an index card. Grids multiply it by levels, martingales multiply it by courage, and both are survivable only when the worst case is computed *before* the first order is placed. When our Tools Library calculators arrive, they will do this arithmetic in seconds; until then, the worked examples above are the manual version, and doing them by hand a few times is time well spent.

Stackbot-checked · Oct 2026  ← All guides  ·  Browse the directory