Skip to content

MetaTrader 5

Position Sizing: Methods, Formula and Calculator

Position sizing determines how many units or lots a trade uses. For a stop-based forex position, lots = risk amount ÷ (stop distance in pips × pip value per 1.00 lot). Fixed lots hold quantity constant; fixed cash risk holds the planned loss constant; fixed fractional sizing recalculates that loss as a percentage of balance or equity. Broker volume limits, costs and execution can make the accepted size or realised loss differ.

Illustrative position sizing cover with two different shapes of equal area representing a constant loss budget across different stop distances and volumes.
Quantity, planned loss and margin are different measures.

Position sizing belongs to the risk management library. The central distinction is between quantity, planned loss and margin. A number that describes one does not automatically describe the others.

Position sizing at a glance

Scroll horizontally to read every column.

Method What stays fixed What changes the lots
Fixed lot Requested quantity Only an explicit change to that quantity
Fixed cash risk Planned loss in account currency Stop distance and pip value
Fixed fractional / percent risk Percentage of a specified account measure Balance or equity, stop distance and pip value
ATR-based sizing A chosen risk budget and ATR multiple The volatility-based stop distance
Fixed ratio A rule for increasing size at accumulated-profit thresholds The threshold reached under the chosen schedule

TradingView documents fixed-percentage risk sizing as monetary risk divided by risk per contract.[1] PineConnector documents the equivalent stop-based calculation in lots.[2] These are sizing methods, not evidence that a strategy has an edge.

How do you calculate position size in forex?

Position size (lots) = risk amount ÷ (stop distance in pips × pip value per 1.00 lot)

Percent-risk amount = chosen balance or equity × risk percentage ÷ 100

  • Risk amount: the planned entry-to-stop loss in account currency, before any costs excluded from the calculation.
  • Stop distance: the distance from the applicable entry to the initial stop, expressed in the same pip convention as pip value.
  • Pip value per 1.00 lot: pip size × contract size, then converted into account currency. The broker's contract determines the units.

PineConnector defines one pip as ten symbol quoting points. On the illustrative five-decimal EURUSD contract used here, one pip is 0.00010. A 100,000 EUR contract therefore has a pip value of 0.0001 × 100,000 = USD 10 per 1.00 lot.[2] Other contracts and account currencies need their own calculation; see pips and pip value.

All inputs must describe the same trade. A zero stop distance makes the formula undefined. An absent stop leaves stop-based risk unmeasured. Margin is a separate constraint: enough margin to open a position does not establish its loss at the stop.

Worked example: the same risk with three stop distances

Illustrative numbers, not a recommendation. Assume a USD 10,000 balance, a 1% planned-risk rule, USD 10 per pip per 1.00 lot, and no costs or slippage. The planned cash risk is 10,000 × 1 ÷ 100 = USD 100.

Stop distance Calculated lots Check: planned loss
20 pips 100 ÷ (20 × 10) = 0.50 0.50 × 20 × 10 = USD 100
40 pips 100 ÷ (40 × 10) = 0.25 0.25 × 40 × 10 = USD 100
100 pips 100 ÷ (100 × 10) = 0.10 0.10 × 100 × 10 = USD 100

These quantities already fit an illustrative 0.01-lot step. The calculation follows PineConnector's documented loss-based formula.[2] The calculator needs a pip value in the same currency as the risk amount. It cannot infer the receiving broker's contract from a symbol name.

Calculator

Position size calculator

Lots = risk amount / (stop distance in pips x pip value per 1.00 lot)

The size is rounded down to the volume step and capped at the maximum volume. It shows zero when the minimum volume exceeds the budget. Planned risk excludes costs and slippage. Contract size, volume step and volume limits are broker-specific: read the symbol specification in MT5. A stop can fill at a worse price than set, so a realised loss can be larger.

Account currency
Share of equity at the stop
Entry to stop
Account currency
Broker step, up to 8 decimals
From the specification
From the specification

Worked example with the default inputs.

Position size within volume limits (lots)
0.33
Risk amount
100.00
Unrounded size (lots)
0.3333
Risk at the rounded size
99.00

Working 100.00 / (30 x 10) = 0.3333, after volume step and limits: 0.33

Illustrative calculator. Not a recommendation.

Illustrative position sizing comparison: a USD 100 planned loss and USD 10 pip value give 0.50 lots at 20 pips, 0.25 lots at 40 pips and 0.10 lots at 100 pips.
Illustrative values before costs and execution differences. A wider stop reduces lots only because the planned cash loss is held constant.

How do fixed lots, fixed cash and fixed fractional sizing differ?

Fixed lots preserve quantity. With 0.50 lots and USD 10 per pip per lot, a 20-pip stop represents USD 100; a 40-pip stop represents USD 200. Equal lots do not mean equal risk.

Fixed cash risk preserves a currency budget before rounding and execution differences. A USD 100 rule still uses USD 100 when the account changes. Its share of the account therefore changes.

Fixed fractional sizing, also called percent-risk sizing here, preserves a percentage of a named account measure. A 1% rule gives USD 100 on USD 10,000 and USD 90 on USD 9,000. With the example's 20-pip stop, those budgets produce 0.50 and 0.45 lots.

Balance and equity are different bases. Equity includes floating profit or loss.[2] An illustrative account with USD 10,000 balance and USD 9,000 equity gives a new-entry budget of USD 100 from balance or USD 90 from equity at 1%. Neither calculation reduces existing positions automatically.

Fixed ratio is Ryan Jones's separate approach, from The Trading Game (1999), to changing size at accumulated-profit thresholds, using a parameter commonly called delta.[3] It is not another name for risking a fixed percentage. The threshold schedule still needs a starting quantity, rules for reducing size and an entry-to-stop risk check. No fixed-ratio schedule is recommended here.

How does ATR-based position sizing work?

Average True Range (ATR) can supply the stop distance rather than the cash budget. TradingView's strategy FAQ illustrates an ATR multiple as a stop-distance input and separately explains stop-based percentage-risk sizing.[1] Combining those definitions gives:

Stop distance in pips = ATR in price units × chosen multiple ÷ pip size

Illustrative: an ATR of 0.00100, a multiple of 2 and a pip size of 0.00010 give a 20-pip distance. A USD 100 budget at USD 10 per pip per lot gives 0.50 lots. If ATR doubles to 0.00200, the distance becomes 40 pips and volume becomes 0.25 lots.

The multiple is an example, not a setting recommendation. Specify the ATR feed, timeframe, lookback, evaluation time and whether the initial distance is frozen. A later trailing stop is a separate exit rule. The stop-loss placement guide compares volatility, structure and fixed-distance stops.

How should lot-step rounding and minimum volume be handled?

This library's hand calculation rounds down to the symbol's volume step, then checks minimum and maximum volume. Rounding down preserves the planned budget within the simplified stop-distance calculation. It does not cap execution losses.

Illustrative: USD 94 ÷ (20 pips × USD 10) = 0.47 lots. With a 0.10-lot step, rounding down gives 0.40 lots and USD 80 planned loss. Nearest-step rounding instead gives 0.50 lots and USD 100 planned loss.

A smaller budget can produce no valid quantity. USD 1 ÷ (20 × 10) = 0.005 lots. If the minimum is 0.01 lot, rounding up to that minimum would imply USD 2 at the stop. The original budget and the symbol's minimum cannot both be satisfied.

PineConnector's volume-handling FAQ describes rejecting targets outside absolute minimum and maximum limits and rounding in-range targets to the nearest allowed step.[4] Its syntax reference leaves rounding direction unspecified. Therefore, the hand calculation's round-down convention is not a claim about EA behavior. Check calculated, submitted and accepted lots on demo, including step boundaries.

The contract size and lot-step guide explains the broker fields. PineConnector's syntax checklist identifies MT5 Market Watch → Specification as the place to inspect the exact symbol's limits.[2]

How do TradingView and PineConnector express position size?

As of 25 September 2026, TradingView's strategy properties distinguish quantity, cash order size and percentage-of-equity order size.[5] A percentage-of-equity position value is not a percentage loss at the stop. Stop-based percent risk requires the additional distance calculation in TradingView's strategy FAQ.[1]

PineConnector's explicit volume parameters describe these receiving-account instructions:[2]

Parameter Meaning
vol_lots= A requested quantity in lots
vol_dollar= A planned cash loss in account currency, despite the parameter's name
vol_pct_bal_loss= A planned stop loss as a percentage of balance
vol_pct_eq_loss= A planned stop loss as a percentage of equity
vol_pct_bal_margin= A percentage of balance allocated as margin; stop distance does not determine this quantity

Use one volume method per entry. Each loss-based method needs one explicit stop in the same message: sl_pips=, sl_price= or sl_pct=. Older risk= messages depend on the EA's Volume Type; the number alone does not establish its unit.[8]

Illustrative messages, not recommendations. Each is a separate example for a TradingView alert's Message field. Replace LicenseID with your License ID and EURUSD with the exact broker symbol. Test on demo.

LicenseID,buy,EURUSD,vol_lots=0.50,sl_pips=20

Requests 0.50 lots and a 20-PineConnector-pip stop. The quantity stays 0.50 regardless of the account balance.

LicenseID,buy,EURUSD,vol_dollar=100,sl_pips=20

Requests sizing from a 100-unit account-currency loss budget and a 20-pip stop. The worked example gives 0.50 lots before broker checks.

LicenseID,buy,EURUSD,vol_pct_bal_loss=1,sl_pips=20

Uses 1% of the receiving account's balance as the loss budget. It matches the cash example only when that balance is 10,000 in account currency.

ATR-based sizing can be expressed by calculating the initial distance and sending its numeric stop with a documented loss-based parameter. A native fixed-ratio sizing mode is not documented; test on demo any separately implemented schedule. The PineConnector sizing, stop-loss and take-profit guide covers message configuration.

TradingView's order quantity is not automatically a MetaTrader lot quantity, as PineConnector's no-code guide explicitly warns.[6] Keep the evidence chain separate: condition true, alert triggered, webhook delivered, signal processed, EA request sent, broker acceptance, deal and resulting position. MetaQuotes distinguishes an order instruction from an executed deal and the resulting position.[7]

What does a position size calculation leave out?

  • Execution and costs: commission, slippage, gaps and currency conversion can change the realised loss. The stop-distance budget is a calculation, not an execution result.[2]
  • Total exposure: several individually sized trades can share the same market driver. Account-level portfolio heat and correlated exposure need a separate calculation.
  • Margin and broker constraints: a valid risk calculation can still produce a rejected order or no permissible lot size.
  • Changed protection: moving the stop changes current exposure. Retain the initial risk separately when calculating R-multiples.

Frequently asked questions

How do you calculate position size in forex?

Divide the planned loss in account currency by the stop distance in pips multiplied by pip value per 1.00 lot. Illustrative: USD 100 ÷ (20 pips × USD 10 per pip per lot) = 0.50 lots. Check the broker's minimum, maximum and volume step. Costs and execution can make the actual loss differ.

What is fixed fractional position sizing?

Fixed fractional position sizing uses a fixed fraction of a specified account measure as the planned risk per trade. In a percent-risk rule, multiply balance or equity by the percentage, then divide by the loss per lot at the stop. The cash budget changes with the account measure. State whether the rule uses balance or equity.

Is percent risk the same as TradingView's percentage of equity?

Percent risk describes the planned loss at a stop as a share of the account. TradingView's percentage-of-equity order-size setting instead determines position value from equity. A stop-based risk calculation also needs entry-to-stop distance and the instrument's monetary value per price move. The two percentages therefore represent different quantities.

What inputs does a position size calculator need?

A stop-based position size calculator needs the cash risk amount, stop distance and pip value per lot in account currency. A percent-risk calculation also needs the chosen balance or equity. Broker minimum volume, maximum volume and lot step determine whether the computed quantity is valid. A symbol name alone does not supply all those inputs.

Reviewed 25 September 2026. Facts were checked against the linked sources on that date. Nothing in this article was tested on a trading account and no code was compiled.

Related reading

Sources

  1. TradingView – Strategies FAQ: stop losses and fixed-percentage risk, accessed 25 September 2026.
  2. PineConnector – Syntax: loss-based sizing, volume, pips and broker values, accessed 25 September 2026.
  3. Adaptrade Software – Fixed Ratio Position Sizing (describing Ryan Jones, The Trading Game, Wiley, 1999), accessed 26 September 2026.
  4. PineConnector – FAQ: final trade volume, accessed 25 September 2026.
  5. TradingView – Strategy properties, accessed 25 September 2026.
  6. PineConnector – No-code alerts: quantity mapping, accessed 25 September 2026.
  7. MetaQuotes – Basic Principles: orders, deals and positions, accessed 25 September 2026.
  8. PineConnector – EA settings: Volume Type, accessed 25 September 2026.

PineConnector executes the instructions you send it. It does not select trades, manage money, or hold funds. Trading carries risk, and past performance of any strategy does not indicate future results.


Leave a comment

Back To PiCo Blog

Ready when your strategy is

You bring the strategy.We bring the infrastructure.

Connect TradingView to MetaTrader, choose where MT5 runs and put the full PineConnector workflow through its paces from your first month.

Strategy and trading decisions remain yours. The MT5 environment can be ours.

PineConnector Edge

Run the full PineConnector workflow.

$59/mo at launch

Core plan · 1 connection · 1 hosted MT5 environment

Try Core for $7

7 days of Core for $7, then $59/month at the launch price unless you cancel.