The position sizing formula

  1. Decide how much of your account you will risk on the trade (for example 1%).
  2. Decide where your stop loss goes, measured in pips.
  3. Divide:

Position size (lots) = amount at risk ÷ (stop loss in pips × pip value per lot)

The calculation means the stop loss decides your position size, not the other way around. A wider stop needs a smaller position.