TradingView backtesting and risk guides

Crypto Position Size Calculator

Divide your risk budget by the distance from entry to stop to estimate coin quantity. Use this for spot purchases or linear positions, with all money inputs in the same quote currency.

For BTC/USDT, enter equity, risk and prices in USDT. The result is BTC quantity.

Risk budget

Theoretical coin quantity

0.1

Base coins, not exchange contract count

Notional value (quote currency)
5,000
Planned price loss at stop (before costs)
200
Risk as a share of equity
2%
Stop distance from entry
4%

Assumes a complete fill at the stop. Fees, slippage, funding and liquidation are excluded. Displayed values are rounded; check exchange quantity increments before placing an order.

What the calculator supports

The output is a coin quantity. For a spot purchase, check that its cost fits your available quote balance after fees. For a linear derivative, use the result only when one coin of exposure gains or loses one quote-currency unit for each one-unit price move.

Product assumptions and checks before using the quantity
ProductSupported calculationSeparate check
Spot purchaseCoin quantity from entry and lower stopAvailable balance, fees and minimum order size
Linear long or shortCoin exposure with quote-currency P&LContract multiplier, margin and liquidation rules
Inverse or quantoNot supportedUse the exchange payout formula and settlement currency

If one linear contract represents 0.001 BTC, a theoretical 0.1 BTC exposure corresponds to 100 contracts: 0.1 / 0.001. That multiplier is a hypothetical example, not an exchange specification. This tool does not fetch multipliers or convert its output into contracts.

Worked example: 200 USDT of planned price risk

Assume equity of 10,000 USDT, a 2% risk budget, a BTC entry of 50,000 USDT and a stop at 48,000 USDT. These are illustrative inputs, not current prices or a recommended trade.

  1. Risk budget = 10,000 × 0.02 = 200 USDT.
  2. Loss per BTC at the stop = 50,000 − 48,000 = 2,000 USDT.
  3. Quantity = 200 / 2,000 = 0.1 BTC.
  4. Entry notional = 0.1 × 50,000 = 5,000 USDT.
  5. Modeled loss = 0.1 × 2,000 = 200 USDT, before costs.

A linear short from 50,000 to a protective stop at 52,000 has the same 2,000 USDT price distance and 0.1 BTC quantity. An unleveraged spot purchase does not allow that short in this calculator.

Leverage changes collateral, not the risk equation

For the same 0.1 BTC linear position, 5× leverage gives a simplified entry-margin estimate of 5,000 / 5 = 1,000 USDT. At 10× it is 500 USDT. The modeled price loss at 48,000 remains 200 USDT in both cases. Multiplying the 0.1 BTC output by 5 would instead create 0.5 BTC of exposure and a 1,000 USDT price loss at that stop.

Those margin estimates exclude fees and exchange adjustments. Actual requirements depend on mark price, risk tiers, margin mode and collateral rules. This calculator supplies neither an order-size approval nor a liquidation price. A planned stop does not guarantee execution before liquidation.

When the simple formula fails

Inverse contracts use reciprocal prices and can settle P&L in the underlying coin. Bybit documents inverse long P&L as contract quantity × (1 / entry price − 1 / exit price), under its contract specification. That is a different unit relationship from coin quantity × price difference. Quanto contracts can also have a different payout multiplier or settlement currency; neither type is modeled here.

A zero stop distance makes the sizing formula undefined. A very tight stop can produce an unaffordable spot notional. For example, a 200 USDT budget and a 50,000 to 49,900 stop gives 2 BTC, costing 100,000 USDT. With only 10,000 USDT available, 0.2 BTC is the pre-fee funding ceiling and has just 20 USDT of modeled stop loss.

Round a theoretical quantity down to the exchange step, then recompute risk. If it falls below the minimum quantity or notional, the trade may be unavailable at that risk budget. Costs and worse fills can still push actual loss above the budget: at 0.1 BTC, an exit at 47,500 loses 250 USDT before costs instead of 200.

Check the strategy units, then record the trade

Give the entry, stop, coin quantity and contract specification to the Pine Script AI Coding Agent when drafting or reviewing a sizing rule. Confirm how the selected TradingView symbol interprets order quantity and point value before comparing its backtest with this result.

Use Trading Journal to record the planned risk and review it against executed entries, exits and costs. These are separate review steps; this calculator does not send orders, sync its output to the journal or replace exchange margin checks. The TradingView backtesting guides cover the next testing steps.

Sources and calculation assumptions

Bybit documents linear USDT P&L, leverage and ROI, and inverse P&L. These explain the product distinctions; your venue's contract and risk rules remain the authority for an actual order. TradingView's strategy documentation explains order sizing and simulated fills.

For calculation and education only, not investment advice. No risk percentage or position size is recommended by this page.

Frequently asked questions

Does this calculator support crypto futures?

It supports the price-risk calculation for linear positions whose P&L equals coin quantity times price movement. It does not calculate exchange contract counts, inverse or quanto payouts, margin requirements or liquidation prices. Check the contract multiplier and settlement currency before using the result.

Should I multiply the coin quantity by leverage?

No. The quantity already represents the full position. Multiplying it by leverage also multiplies the modeled price loss at the stop. For an unchanged position, leverage changes collateral requirements rather than the price P&L.

Can I enter my BTC account balance directly?

Only if prices and risk are also expressed in BTC as the quote currency. For a BTC/USDT trade, convert account equity to USDT first. Do not mix BTC equity with prices in USDT, or treat USD, USDT and USDC as interchangeable without conversion.

Is the planned risk a maximum possible loss?

No. The result assumes a full exit at the entered stop price and excludes fees, funding and slippage. A stop may fill at a worse price, and a leveraged position can be liquidated before the planned stop executes. This calculator does not model those events.

Review your sizing rule in Pine Script

Describe the symbol, quantity units, entry and stop rules. Use Pineify to draft editable code, then verify the resulting orders and costs in TradingView.

Open Pine Script AI Coding Agent