Risk Calculator

The exact size of your position before you enter.

Best on
Any
Markets
All
0:00 / 0:41
Transcript

This is the Risk Calculator. It tells you exactly how big your position should be, before you place the trade. When you add it, click twice on the chart: once for your entry, and once for your stop. Then it takes your balance and the risk you choose, for example one percent, and works out the quantity, fees included. It also shows the margin at your leverage, and roughly where you would be liquidated, with a warning if that comes before your stop. Targets are drawn in multiples of your risk, with the profit for each one, after fees. For forex and CFDs, set the units per lot, and the size comes out in lots, ready for your broker.

Risk Calculator works out how much to buy or sell from your balance, the risk you accept and your stop, with fees, margin, approximate liquidation and targets drawn on the chart. It converts to your account currency and recognises the market to give you the quantity in coins, lots, contracts or shares.

Real example on TradingView

A real case recorded on TradingView with the indicator, explained step by step.

AUD/USD · 1 h · FXCM · 25 Sep 2026Forex settings: 100,000 units per lot, 2 decimals, fee 0 (it is in the spread), leverage 30 and panel at the top right. Entry and stop set from the settings.

What it does

When you add it, you click twice on the chart: entry and stop. With your balance and your risk (in % or fixed) it calculates the quantity, rounded down to the decimals your exchange accepts.

It shows the notional, the margin at the leverage you choose, the approximate liquidation in isolated margin, the round-trip fees, the loss at the stop and the result at each target.

If your account is in another currency (for example, an account in USD trading USD/JPY or EUR/GBP), it converts balance, risk and results with the live exchange rate and shows the rate used in the panel.

Why it matters

Position size is the only thing that controls how much you lose when you are wrong. Working it out by hand on every trade is slow and error-prone.

How it works

  1. 1

    Risk in money

    Balance times risk percentage, or a fixed amount.

  2. 2

    Quantity

    Risk divided by the distance to the stop plus the entry and exit fees. Rounded down.

  3. 3

    Margin and liquidation

    Notional over leverage; approximate liquidation with the maintenance margin.

  4. 4

    Account currency

    If you choose a currency different from the pair's, it looks up the live exchange rate (direct or inverse) and converts risk and results.

  5. 5

    Market

    On Auto it reads the chart: crypto in coins, forex in lots of 100,000, gold in lots of 100 oz, silver of 5,000 oz, index CFDs and futures in contracts, stocks in shares. Futures use the contract's point value.

  6. 6

    Targets

    At 1, 2 and 3 times the risk (configurable) or at the prices you set, with the result net of fees and its R multiple.

What it marks on the chart

Every element the indicator draws, with the look and colour you will see on TradingView.

  • Thick line and Long / Short label

    Entry, with the quantity (e.g. “Long 0.55 lots @ 0.70180”).

  • Red box and SL label

    Loss zone down to the stop, with the loss in money on a red label.

  • Green box and TP labels

    Targets in multiples of the risk or at your prices, each with its profit on a green label.

  • Panel

    Risk, direction, distance to the stop, quantity, notional, margin, liquidation, fees, loss, target and, if it converts, the exchange rate used.

  • Red dashed line (optional)

    Approximate liquidation price. Turned on with Draw liquidation price on the chart.

  • Warning

    Warning if liquidation comes before the stop, if the margin exceeds the balance or if the quantity rounds to zero.

How to use it

  1. 1

    Set up your account once

    Balance, account currency, risk per trade, leverage and your exchange's fee.

  2. 2

    Mark entry and stop

    Two clicks when you add it; afterwards you can move them from the settings.

  3. 3

    Copy the quantity

    The quantity in the panel is the one to enter on your exchange.

Tips

  • Check the liquidation warning: with a lot of leverage and a distant stop, you get liquidated before reaching the stop.
  • Adjust Maintenance margin to your exchange's table for your position size.
  • Leave Market on Auto; use Custom only if your broker uses another lot or contract size.
  • If you prefer to set your targets at specific levels, change Targets as to Prices. A price on the other side of the entry is ignored.

Where it works best

Timeframes

  • AnyRecommendedIt does not depend on the timeframe.

Markets

  • Crypto spot and USDT futuresRecommendedQuantity in coins.
  • Forex, gold and CFDsRecommendedQuantity in lots, converted to your account currency.
  • Futures and stocksUsefulContracts with the contract's point value; stocks in shares.

Limits

What the indicator does not do, so you do not expect something it cannot give you.

  • Liquidation is approximate: every exchange applies its own rules and margin tiers.
  • Forex fees are usually in the spread: set the fee to your broker's.
  • The conversion uses TradingView's live exchange rate; if it cannot find the pair, it uses the daily rate, which may vary a little. USDT and USDC are treated as USD.

Questions

Why is the quantity a bit smaller than expected?

Because it includes the entry and exit fees in the risk and rounds down.

How do I change the entry later?

From the indicator's settings, or by ticking Use last price to use the current price.

My account is in euros and I trade USD/JPY. What do I set?

Account currency to EUR and the balance in euros. The indicator converts the risk and the results with the current exchange rate.

Thirteen indicators, one reading.

See all the indicators