Set the stop where the idea is wrong, turn the risk amount and that distance into a position size, then choose leverage only so liquidation stays beyond the stop.
Worked example. The figures are for the arithmetic.
- The account is $1,000. Risk per trade is 1%, so the risk amount is $1,000 × 0.01 = $10.
- The long entry is 60,000. The stop is 59,400. The distance is 600 / 60,000 = 0.01, or 1%.
- Position size is $10 / 0.01 = $1,000 notional. Coin size is $1,000 / 60,000 = 0.01667. This size does not depend on leverage.
- At 5x the margin is $1,000 / 5 = $200. The isolated liquidation estimate is 48,300. The stop at 59,400 is 59,400 − 48,300 = 11,100 above that estimate.
- At 20x the margin is $1,000 / 20 = $50. The estimate is 57,300. The same stop is 59,400 − 57,300 = 2,100 above it. The planned loss if 59,400 fills is still $10, before fees and slippage.
Both settings keep this particular stop beyond the estimate. The cushion is what changed: 11,100 points at 5x, 2,100 points at 20x. If the stop were 5% under the entry, at 57,000, the 20x estimate of 57,300 would sit between the entry and the stop. The exchange would be estimated to close the position before that stop. Lower the leverage or the size. Do not push the stop out just to clear liquidation, because that raises the dollar risk.
The position size calculator does step 3. The risk/reward calculator adds a take-profit and reports the ratio, the dollar risk, and the dollar reward for this same entry and stop. Order types covers how the stop is actually sent, including a mark-price trigger and reduce-only. Where to place a stop-loss is how that 59,400 level is chosen before the leverage is set. The key that sends the order should not be able to withdraw. API key safety for a crypto futures bot is which permissions to turn on, and which to leave off.