Tool Guide

How Auto Lot-Sizing Works in FxBacktest (Fixed Risk on Every Trade)

Position sizing is where most manual backtests quietly break - a trader eyeballs a lot size and their risk drifts trade to trade. Auto lot-sizing removes that error entirely by calculating the exact size that keeps your dollar risk constant.

Auto lot-sizing calculates your position size from three inputs - account balance, risk percentage, and stop distance - so every trade risks the same amount of money. You set the risk once; the tool sizes each trade to match it, no matter how wide or tight the stop.

The problem it solves

In manual backtesting it is easy to keep the same lot size across trades with very different stop distances. That means your actual dollar risk swings wildly - a tight-stop trade risks little, a wide-stop trade risks a fortune. Your results become impossible to read in R and your worst trades hit far harder than intended. Auto lot-sizing eliminates this by anchoring risk, not size.

The math behind it

Dollar risk is simply stop distance times position size times pip value. Fix the dollar risk and the position size falls out:

Position size = (Account balance x Risk %) / (Stop distance x pip value)

So if you risk 1% of a $10,000 account ($100) on a 50-pip stop, the tool sizes the position so that a 50-pip loss equals exactly $100. Change the stop to 100 pips and it halves the size automatically to keep that $100 intact. This is the same formula covered in position sizing, done for you on every trade.

Same $100 risk, any stopsize adjusts, risk holds
25-pip stop
larger size
50-pip stop
medium size
100-pip stop
smaller size

All three trades risk the same $100. Only the position size changes to absorb the different stop widths.

Why fixed risk matters

Fixed fractional risk is what keeps a normal losing streak survivable. Risk 1% and eight losses in a row costs about 8% - recoverable. Let risk drift to 5% on some trades and the same streak can gut the account. Auto lot-sizing enforces the discipline so you cannot accidentally oversize, which is exactly the habit you want burned in before live trading.

Important: in FxBacktest the stop-loss label on the chart reflects the pure pip-based dollar risk. Reading that number as you drag the stop teaches you to feel the relationship between stop distance and risk - a skill that pays off on every future trade.

It also makes your stats cleaner

Because every trade risks the same, your results translate directly into R-multiples, and metrics like expectancy become meaningful. Inconsistent sizing corrupts those numbers; fixed sizing makes them trustworthy. Auto lot-sizing is therefore not just a convenience - it is what makes the rest of your analytics honest.

See it work

Set your risk once when you start a session, then drag your stop wherever your strategy calls for it. The simulator sizes each trade to match your risk and shows the dollar figure as you go, so you learn the relationship while you test. It is the simplest way to make disciplined position sizing automatic.

Auto lot-sizing FAQ

What is auto lot-sizing?

It calculates position size from your balance, risk percentage, and stop distance so every trade risks the same amount of money regardless of stop width.

Why does a wider stop mean a smaller position?

Dollar risk is stop distance times size. A wider stop costs more per pip, so the position must shrink to keep total risk constant.

Should I keep risk fixed on every trade?

For most traders, yes. Fixed fractional risk keeps losing streaks survivable and makes results comparable in R. Auto lot-sizing enforces it automatically.

Risk disclaimerTrading foreign exchange, CFDs, and other leveraged products carries a high level of risk and is not suitable for every investor — losses can exceed your deposits. Everything on this page is educational content, not financial advice. Backtest and simulator results are hypothetical: they do not represent live trading and past performance does not guarantee future results.