To calculate position size, divide the money you are willing to risk by the value of the stop-loss distance for one lot. First choose your account risk, then measure the stop in pips and confirm the instrument’s pip value. The result is the lot size that keeps the planned loss within your limit.
Start with account balance multiplied by risk percentage to find risk in money. Then multiply the stop-loss distance by the pip value for one standard lot. Divide risk money by that result. For example, risking $100 with a 20-pip stop worth $10 per pip per lot gives 0.50 lots. Always round down to a volume your broker supports.
Risk note: Leverage changes required margin, not the amount you should risk on a trade.