Lot Size Calculator is a free MetaTrader 5 indicator from barmenteros FX. Set your risk as a percentage of equity, drag the line to your stop-loss, and the panel shows the lot size, rounded to a volume your broker accepts. It needs MetaTrader 5 build 6191 or later.
Download Lot Size Calculator for MT5 (zip) (opens in a new tab)
The link downloads the latest release from GitHub, with no sign-up. What changed in each version is on the releases page (opens in a new tab).
Version 2.10 is the first release for MetaTrader 5: the same calculator as the MT4 version 2.10, with the same panel and the same results for the same stop and risk. Trading on MetaTrader 4? Use the MT4 position size calculator.
Install the MT5 Lot Size Calculator (Build 6191 or Later)
Check your build first: in MetaTrader 5, Help → About shows it.
- Download the zip above and unzip it.
- In MetaTrader 5, open File → Open Data Folder, then the
MQL5/Indicatorsfolder. - Copy
Lot Size Calculator.ex5into that folder. - Restart MetaTrader 5, or right-click Indicators in the Navigator and choose Refresh.
- Drag Lot Size Calculator from the Navigator onto a chart.
- Enter your risk in the panel’s Risk, % of equity field, then drag the line to your stop-loss.
Until you move it, the line follows the price and the panel says “No stop”: the gray size it shows comes from your broker’s margin, not from your risk. The panel’s title shows the version you are running.
How the Calculator Sizes a Trade: A Worked Example

In this panel, equity is 10,000 USD and the risk 1.00 %, so the target risk is 100.00 USD. The stop is 40.0 pips away. On a pair quoted in US dollars, a standard lot of 100,000 units moves 10 USD per pip, so a 40-pip stop costs 400 USD per lot, and 100 USD buys 0.25 lots.
The panel does that arithmetic from the symbol data your broker sends, and updates the size by itself when the price moves, when you move the line and when you change the risk. There is no button to press.
Why the Panel Shows a Target Risk
The risk you actually take can differ from the target, and the panel tells you when rounding or your broker’s lot limits change it:
| Case | Lot size shown | Your real risk |
|---|---|---|
| Normal | Rounded down to your broker’s lot step | At or below the target, usually slightly |
| Size below your broker’s minimum lot | The minimum lot, with an orange warning such as “risks 4.00 % (target 1.00 %)” | Above the target: check it before you trade |
| Size above your broker’s maximum lot | The maximum lot, with the real figure | Below the target |
The real-risk figure leaves out commission, spread and slippage. An Expert Advisor that sizes its own trades must handle the same lot step and limits in code: Your EA Calculates Lot Size Wrong shows three ways that goes wrong.
What Else the MT5 Panel Does
- Keeps your stop. The line, the risk and the panel’s position survive a timeframe change and a terminal restart, separately for each chart. Removing the indicator, closing the chart, applying a template or switching profile clears them.
- Releases the line on a new symbol. Changing the chart’s symbol frees the line and keeps the risk.
- Says when it cannot calculate. Without account or symbol data it shows “Not calculated” instead of a number that looks real, and recovers by itself when the data arrives.
Holding more than one position? Size each new trade against your combined exposure: see position sizing with multiple open positions.
Frequently Asked Questions
Does the MT5 position size calculator work on older MetaTrader 5 builds?
No. Lot Size Calculator needs MetaTrader 5 build 6191 or later. The About window in the Help menu shows your build; if it is older, update MetaTrader 5 first.
Is the MT5 version the same as the MT4 version?
Yes. Version 2.10 for MetaTrader 5 is the same calculator as the MT4 version 2.10, with the same panel and the same results for the same stop and risk. The file is Lot Size Calculator.ex5, installed in the MQL5/Indicators folder.
Does the calculator place trades?
No. It is an indicator: it shows the lot size for your stop and risk, and you place the order yourself with that volume.
Need the Same Sizing Inside Your EA?
An Expert Advisor that sizes its own orders needs the same rounding and broker-limit checks in its code. At barmenteros FX we have built MetaTrader programs for clients since 2011; our MT5 programmers can add risk-based sizing to your EA.
Want your EA to size its own trades this way?