Ticker by TradingView

Indicators / TE-005

TE Position Size & Risk

Contract or share count from your stop distance and your risk budget, computed on the chart.

The decision it changes: How many contracts or shares to trade so a stop-out costs what you planned and no more.

Open it free on TradingView

Free and open-source. Add it from the script page, no membership needed.

What it reads

Your stop distance, your risk budget, the symbol point value and its minimum tick.

How it is computed

Risk per unit is stop distance in points times point value. Size is the risk budget divided by risk per unit, rounded down to a whole unit.

Worked example. A $500 budget on MES with an 8 point stop: 8 points times $5 per point is $40 per contract. 500 divided by 40 is 12.5, rounded down to 12 contracts.

Why it matters

Size is the one variable you fully control. Fixing it from the stop keeps every loss the same size whatever the setup.

What it does not tell you

It does not choose the stop for you or account for slippage beyond the stop price.

Inputs

Read from the script's own settings, so this list matches what you see in TradingView.

SettingDefaultWhat it does
ThemeDarkWhich chart background this is drawn for. Changing it re-picks every colour so text and lines stay legible. It cannot detect your theme automatically, so set it to match your chart.
Hover tooltips (on-chart explanations)trueShows or hides the explanation that appears when you hover a table cell or a label on the chart. Off removes that hover text only: every printed value, line, zone and alert is unchanged, and nothing is recomputed.…
Entry price E0.0The price you intend to enter at. This is a PRICE input, so you place it by clicking on the chart when you add the script and you can drag it afterwards. every figure below recomputes as you move it. Leave it at 0 and…
Stop price S0.0The price at which the plan is wrong. Also a draggable price input. The stop distance is d = abs(E - S), in the instrument's own price units, and it is the denominator of everything below. If S equals E there is no…
Target price T (0 = none)0.0Optional. Give a target and the reward multiple is reported two ways: gross, abs(T - E) / d, which is the number everyone quotes, and net of the round-turn costs you entered below, which is the one that is true. They are…
Risk budget modeFixed amountHow the budget R for this one trade is stated. Fixed amount uses the figure below directly. Percent of account computes R = A * r / 100 from the account size A and percent r below. Percent mode exists because it is how…
Fixed risk R (account currency)500.0The budget R for this trade in your account currency, used when the mode above is Fixed amount. This is the most the position is intended to lose if the stop is reached, including the costs you enter below. It is a…
Account size A50000.0The account size A used by Percent of account mode, in your account currency. Typed by you and stored only in this script's settings. It is never read from anywhere, and no part of this script can verify it.
Risk percent r (% of A)1.0The percent r of account size A to risk on this trade, giving R = A * r / 100. The default of 1 percent is an example value offered as a starting point only: it is not a recommendation, it is not derived from any…
Round-turn cost per unit (currency)0.0Commission plus any slippage allowance, in account currency, for ONE unit in and out. It is added to the per-unit risk: riskPerUnit = d * pointValue + cost, so it goes in the DENOMINATOR of the size calculation. Leaving…
Quantity stepAuto (from the symbol)The smallest quantity the size is rounded DOWN to. Auto reads the symbol: a future, a stock, a fund or a depositary receipt sizes in whole units. a crypto pair sizes fractionally, to the symbol's own minimum trade size…
Custom step (units)1.0The quantity step used when the mode above is Custom step, and for any symbol type Auto has no convention for. Examples: 1 for whole shares or contracts, 0.1 for fractional shares, 0.0001 for a crypto venue that allows…
Maximum quantity cap (0 = none)0.0Your own ceiling on position size, in the same units as the size, applied AFTER the budget division rather than instead of it and rounded down to the quantity step. That ordering is what lets the readout tell you WHICH…
Draw entry, stop and targettrueDraws a horizontal line and a hover-enabled tag at each of the three prices. Every tag explains the number it sits on. Turn this off to keep only the readout table.
Extend lines to the righttrueExtends the three plan lines to the right edge of the chart so they stay visible as price moves away from them. Off draws them only across the recent bars.
Show readout tabletrueThe readout table: the position size, what it actually risks after rounding down, the unused budget, which constraint bound the answer, the stop distance in points, ticks and percent, and the reward multiples if a target…
Table anchorTop rightWhere the readout table is anchored on the chart. Move it if it overlaps something you need to read.
Compact mode (reduced rows)falseReduces the table to three rows for small screens: the size, what it risks, and the stop distance. Also steps the font down one size. The rows it hides are secondary readouts, not warnings, so nothing load-bearing…

Every tool, one membership

TE Position Size & Risk is part of the Trader's Edge indicator set, alongside APOLLO ONE.

Get access: $49.99/monthSee all indicators

Decision support, not financial advice. Trading carries risk of loss.

Platforms named on this page: TradingView.

Free newsletter

The daily issue, in your inbox.

Today's recap, tomorrow's event clock, and what the desk is watching. Free, by email. Unsubscribe whenever you want.