Risk Position Size

Works out the largest size for a planned trade that still fits the room left under your prop firm's daily loss limit and maximum-loss floor, as you enter them. You click an entry and a stop on the chart. It keeps part of the room unused and rounds the size down.

Free TradingView indicator · Open source · Not published yet

Status

Not published yet. Risk Position Size will be a free, open-source indicator on TradingView. Until it's published there's no script page to link to, and we don't show mock-up screenshots. Join the waitlist to hear when it goes live.

What it does

Before you place a trade, it answers one question: how big can this trade be if the stop is hit, without breaking your daily loss limit or your maximum loss?

From the entry and stop you click, it measures the room left before both limits and takes out the risk already open on your other positions. It keeps part of that room unused as a cushion, rounds the size down to the symbol's size step, and caps it at your firm's maximum size if you enter one.

It does not give trade signals, and it does not open, close or change orders: you place trades on your firm's platform. It can't see your account, so you type the account values in from your firm's dashboard.

Who it's for

  • Traders on a prop-firm evaluation or funded account who size trades from a stop on TradingView: futures, forex, CFDs, metals, stocks or crypto.
  • Accounts with a daily loss limit, a static or trailing maximum loss, or both, including accounts that start at 0, as some futures funded accounts do.
  • A personal account too: set both loss rules to Off, and the size follows your risk setting only.

It's not for you if you want a tool that reads your account or places orders. TradingView scripts can't do either.

What you see on the chart

A panel, a line at your entry, a dashed line at your stop, and a label next to the entry with the size and the loss at the stop, for example "2 contracts · loss at stop 425.00 USD". All money is in your account currency.

Panel rowWhat it shows
SymbolThe chart symbol, its price currency, and the rate used to convert to your account currency.
Rules onEquity or balance, the value used, when you last updated your numbers, and how long ago that was.
Daily roomMoney left before the daily loss limit, and the floor it's measured against.
Max-loss roomMoney left before the maximum-loss floor, static or trailing, and the floor. "from firm" when the floor you copied from your firm is used.
Risk budgetWhat this trade may lose at the stop, after the room cap.
Stop distanceEntry to stop, rounded up to a whole tick, plus the slippage allowance, in price and in ticks.
SizeThe size in contracts, shares, coins, units or lots, rounded down. Amber with a short reminder when something needs a check, such as "no firm cap set" or "check day-start".
Loss at stopWhat you lose at the stop with that size, commission included.
Losses like this to limitHow many losses of this size fit before the tighter limit.
Next resetTime left to your firm's daily reset, the reset time and time zone, and when the panel last updated.
Status"Fits the room you entered." in green only when nothing needs attention. Otherwise each heads-up in amber, one per line, or in red the reason the size is 0.
Intraday trailingOnly in that mode: a permanent amber line saying that open profit raises the floor.

How to use it

  1. Add the indicator to your chart. TradingView asks for two clicks: first the entry, then the stop. You can drag them later. After you switch symbol, pick them again.
  2. Open the settings. Under Account, choose your account currency and copy your initial balance, current balance and open P&L from your firm's dashboard. In Risk already open on other positions, enter what you would lose if the stops of your other open positions were hit.
  3. Set Values above are as of to the time you copied the numbers, in the chart's time zone (the clock at the bottom right of the chart). Do it every time you update them.
  4. Under Daily loss rule and Maximum loss rule, enter your firm's rules. For Day-start value, enter the balance or equity at the last daily reset: the value itself, not the day's profit or loss. Update it after every reset. On an account that starts at 0, enter an initial balance of 0 and use fixed amounts.
  5. Under Daily reset, enter your firm's reset time and time zone.
  6. Under Size rules, set the risk per trade, the slippage and spread allowance, and your commission. On CFD, index and metal symbols, set Size unit to Custom units per lot with the units per lot from your broker's contract specification. On futures, enter your firm's contract limit for the symbol, minus what you already hold, in Maximum size allowed by firm, and update it when you switch symbol.
  7. Read the size and the status row. Check every amber heads-up before you trade.

Settings

The settings are grouped as they appear in the indicator. They're hidden from the chart's status line.

Account (copy from your firm's dashboard)

SettingWhat to enter
Account currencyUSD, EUR, GBP, CHF, JPY, AUD, CAD or NZD. Default USD.
Initial balanceThe starting balance of the evaluation or funded account. 0 for an account that starts at 0. Default 100,000.
Current balanceBalance from closed trades, as your firm shows it now. Default 100,000.
Open P&L now (all positions)Floating profit or loss of every open position, negative for a loss. Default 0.
Risk already open on other positionsWhat you would lose from here if the stops of your other open positions were hit. It's taken out of the room before this trade is sized. Default 0.
Rules measured onEquity (balance + open P&L) or Balance (closed trades). In balance mode, open losses still count. Default Equity.
Values above are as ofWhen you copied the numbers, in the chart's time zone.

Daily loss rule

SettingWhat to enter
Daily loss limit% of initial balance, % of day-start value, Fixed amount, or Off. Default % of initial balance.
Limit value (% or amount)Default 5.0.
Day-start valueBalance or equity at the last daily reset, as your firm reports it. If your firm uses the higher of the two, enter the higher one. Default 100,000.

Maximum loss rule

SettingWhat to enter
Maximum loss typeStatic (initial balance minus limit); Trailing, intraday peak (equity); Trailing, end-of-day or closed-balance peak; or Off. Default Static.
Maximum loss is% of initial balance or Fixed amount. Default % of initial balance.
Limit value (% or amount)Default 10.0.
Highest value reachedTrailing types only: the peak your firm trails. The tool never uses less than the current balance or the initial balance. Default 100,000.
Trailing floor stops at initial balance + offsetTurn it on only if your firm's rules name a level where the trailing floor stops. Default off.
Lock offset above initial balanceThe amount above the initial balance where the floor stops, or 0. Default 0.
Use the max-loss floor your firm showsOptional: the floor your firm's dashboard shows now. The higher of this and the floor the tool works out is used. A firm may move the floor up after a payout, which the tool can't know: then turn this on and enter the new floor. Default off.

Daily reset

SettingWhat to enter
Reset timeYour firm's daily reset, hour and minute. Default 17:00.
Time zoneYour firm's time zone. Named zones follow daylight saving time; UTC+2 and UTC+3 are fixed. Default America/New_York.
Block size when values are older than the last resetShows a size of 0 until you update your numbers after a reset. Off shows an amber heads-up instead. Default on.

Trade plan (click entry, then stop)

SettingWhat to enter
Entry, StopSet by clicking on the chart. You can also type exact prices.
Block if entry or stop is this % from priceCatches a plan left over from another symbol. Default 10.

Size rules

SettingWhat to enter
Risk per trade% of remaining room, % of initial balance, or Fixed amount. Default % of initial balance.
Risk value (% or amount)Default 0.5.
Keep unused (% of remaining room)A cushion for gaps and fees you didn't enter. Default 10.
Slippage and spread allowance (ticks)Added to the stop distance. On 5-digit forex, 10 ticks = 1 pip. Default 1.
Commission per lot or contract, round tripIn account currency. Default 0.
Size unitAuto; Units, contracts or shares; Forex lots (100,000 units); or Custom units per lot. Auto shows a size of 0 on CFD, index and other symbols whose lot size depends on the broker. Default Auto.
Units per lot (custom)From your broker's contract specification, for example 100 if one gold lot is 100 ounces. Default 1.
Size step (0 = automatic)Automatic is 0.01 for lots, otherwise the symbol's minimum contract. Default 0.
Maximum size allowed by firm (0 = none)Your firm's limit for this symbol, minus what you already hold. Default 0.

Under Display you set the panel position, the text size, whether the entry and stop lines show, and the Limit, Warning and Within room colors.

How the size is worked out

  • Current value = balance + open P&L (equity mode), or balance + open losses only (balance mode).
  • Daily floor = day-start value − daily limit. The day-start value is your balance or equity at the last daily reset, as your firm defines it.
  • Maximum-loss floor = initial balance − maximum loss (static), or peak − maximum loss (trailing). The peak is the highest of the value you typed, the current balance and the initial balance; with an intraday peak, current equity counts too. With the lock on, the floor stops rising at initial balance + offset. If you enter the floor your firm's dashboard shows, the higher floor is used.
  • Room = current value − floor − risk open on other positions. The smaller of the two rooms is used.
  • Risk budget = your risk setting, capped at room × (100% − "Keep unused").
  • Stop distance = |entry − stop| rounded up to a whole tick, plus the slippage and spread allowance in ticks.
  • Loss per contract or lot = stop distance × point value × units per lot × currency rate + round-trip commission.
  • Size = risk budget ÷ loss per contract or lot, rounded down to the size step, then capped at your firm's maximum.

A worked example

Example inputs, not real account data: a $100,000 evaluation in USD with a 5.0% daily loss limit and a 10.0% static maximum loss, both measured from the initial balance, and a long plan on E-mini S&P 500 futures (tick 0.25, point value $50) with the stop 4.00 points below the entry. Risk per trade 0.5% of the initial balance, 10% kept unused, a 1-tick allowance, no commission.

StepAmount
Current value (balance $99,200, open P&L $0)$99,200
Daily floor ($100,000 day-start − $5,000)$95,000
Daily room$4,200
Maximum-loss floor ($100,000 − $10,000)$90,000
Max-loss room$9,200
Risk budget (0.5% of $100,000; the cap is 90% of $4,200 = $3,780)$500
Stop distance (16 ticks + 1 tick allowance)4.25 points
Loss per contract (4.25 × $50)$212.50
Size ($500 ÷ $212.50 = 2.35, rounded down)2 contracts
Loss at the stop$425
Losses like this before the daily limit9

With the firm's maximum size set to 5, the status reads "Fits the room you entered." in green. Left at 0, the size reads "2 contracts · no firm cap set" in amber, with a reminder to enter your firm's contract limit for the symbol.

When the size is 0

It would rather show 0 than a size built on missing, mistyped or old numbers. The status row names the check that failed. The main ones:

  • A required value is missing or 0: a limit, the risk value, or a day-start value of 0 on an account that doesn't start at 0.
  • The day-start value is below the lowest floor the account can have, initial balance minus the maximum loss. That usually means a default was left in place, or the day's profit or loss was typed instead of the value.
  • Your values are older than the last daily reset (you can switch this check off), or the as-of time is in the future, usually a time-zone mix-up. Correct the as-of time itself: the block doesn't lift when the clock catches up.
  • The entry or stop is missing, they're the same price, or one is further from the current price than the limit you set, as when a plan is left over from another symbol.
  • Size unit is Auto on a CFD, index or other symbol whose lot size depends on the broker.
  • The symbol has no point value or tick size, or there's no rate from its currency to your account currency.
  • A limit is already reached, no budget is left after the room cap, the firm's maximum is below one size step, or the stop is so wide that even the smallest size goes over the budget.

Some checks are amber heads-ups instead. For example, with an end-of-day trailing floor, a day-start value at or below the floor your highest value implies marks the size "check day-start".

How it differs

The clicked entry and stop, the unused buffer and the rounding down are common to other position sizers. This one also covers the rule handling described above, in one tool: it refuses numbers that are likely wrong, handles two kinds of trailing maximum loss with an optional stop level and your firm's own floor, takes out risk open on other positions, and works in 8 account currencies, on accounts that start at 0, with a reset countdown that follows daylight-saving changes. The code is original.

Limits

  • TradingView scripts can't read your broker or prop-firm account. The size is only as current as the numbers you enter and their as-of time.
  • It can't always tell an old value from a current one. With an end-of-day trailing floor it flags a day-start value that can't be right. In static and intraday trailing modes, an old but possible day-start value sizes from the wrong room, so update it after every reset.
  • With intraday trailing, open profit raises the floor. A trade that runs up and then hits the stop can breach even when the loss at the stop fits. The panel shows a permanent line about this in that mode.
  • The panel updates only on new ticks or setting changes, so on a closed or quiet market a reset can pass unnoticed.
  • The daily reset is taken as every calendar day. On futures, the countdown points to Saturday on Friday evening, and over the weekend the size can stay at 0 until you update the as-of time.
  • Each chart keeps its own settings. If you trade several symbols on one account, update the values on every chart.
  • The currency rate is TradingView's daily rate. Point value and contract size come from TradingView's symbol data and can differ from your broker's, especially for CFDs.
  • Slippage and gaps can make a real loss larger than the loss at the stop.
  • It has no alerts.

Risk

Trading involves substantial risk of loss. This tool is not financial advice and does not provide trade signals. It does not guarantee profits or a passed prop-firm evaluation.

Check every number against your firm's dashboard and current rules before you trade. Read the full risk disclosure.

Hear when Risk Position Size goes live.

Free to join. Unsubscribe any time.

Join the waitlist