Docs menu

Position sizing

A strategy decides direction and levels. Sizing decides how much money that decision is worth, and every size the framework sends comes from the fields on this page.

The sizing fields

They sit in the Sizing group of the strategy parameters: Position size unit, Total position size, TP1 size, TP2 size, TP3 size and Max lots. The same values live in the run template under [sizing], as unit, total, tp1_lots to tp3_lots and max_lots.

What the size is measured in

  • % of account balance is the default. One percent means one percent of the balance the run sizes against.
  • Dollar sizes a fixed amount of money per trade, so the balance does not change the size.
  • Lots sends a quantity you state, so the balance plays no part in the size.

What the percentage is taken from is not a per-instance field: a backtest uses the start balance you set, a paper instance uses its account's balance, and a live instance uses the venue account's. A portfolio does not divide the money by hand either: it hands each slot the shared balance at the start of the day and the strategy sizes with its own rule, so several slots can hold several positions of that size, and tomorrow's balance is today's balance plus every slot's realized result.

Total and its legs

The total is spread across the take-profit legs, so three rungs of one trade add up to the total rather than each being a full position. A total with no leg sizes becomes the legs, and a total that does not equal TP1 plus TP2 plus TP3 is refused with the message instead of being rounded quietly.

Max lots

Max lots is the only count cap. Zero means uncapped, and a tranche that would cross the cap is skipped whole, never partly filled.

Compounding

Compounding is off by default, and a run with it off sizes off the fixed start balance. With it on, sizing uses the running balance, so a winning run grows its positions as the account grows, and the market impact model is switched on with it so the cost of that size shows up. That is the honest comparison for a strategy you intend to leave running, and it makes the limits of a thinner market show up as the account gets bigger.

Risk per trade is a separate setting

The stop distance is not a size. Stop loss and the take-profit rungs are set in the risk unit you choose: ticks, points, R, ATR or dollars, see Stops, take-profit and brackets. A dollar risk per trade therefore combines both: the risk unit sets the distance, and the sizing sets the quantity.

A dollar total that the venue cannot support is handled where it is placed, not by lowering the size silently: an entry that does not fit the free margin is reported as skipped.