• Skip to primary navigation
  • Skip to main content
  • Skip to footer
barmenteros FX logo

MetaTrader Programming Services | Programmers for MT4, MQL4, MT5, MQL5, Expert Advisor EA, Forex robots, Algo Trading | barmenteros FX

No matter if you need an MT4 programmer, EA programmer, Forex programmer, or MQL programmer. We are the best qualified team to develop your forex trading strategy. Highly skilled in MT4 programming, Expert Advisor EA programming, Forex programming, and MQL4 programming.

  • Home
  • Blog
  • Services
    • EA programming
    • MT4 Programming
    • MT5 Programming
    • EA Debugging and Code Review
    • TradingView Programming
    • NinjaTrader Programming
    • cTrader Programming
    • Forex Programming
    • Machine Learning For Trading
    • Deep Reinforcement Learning for Trading
  • Products
    • My Account
    • LicenseShield – MT4/MT5 License Protection
    • Latest Offers
    • MT4 Indicators
    • MT5 Indicators
  • Request Quote
  • Show Search
Hide Search
Home/Blog/MT4 Position Size Calculator — Free Download
MT4 chart with position size calculator indicator showing lot size panel and stop-loss line

MT4 Position Size Calculator — Free Download

This free MT4 indicator calculates the exact lot size for each trade based on your account equity, stop-loss distance, and risk percentage — directly on the chart, before you place the order. No manual math. No switching windows. Download and install in under two minutes.

DIRECT DOWNLOAD

At barmenteros FX, we have been building custom MetaTrader tools and Expert Advisors since 2011. This position size calculator is one of the most downloaded free tools on the site — because the problem it solves is universal: traders who size positions correctly survive losing streaks; traders who don’t, don’t.

Table of Contents

Toggle
  • Importance of Position Sizing in Forex Trading
  • Different Position Sizing Methods
  • Examples and Case Studies
  • Using the MT4 Position Size Calculator
  • Broker Compatibility: Symbol Suffixes and Non-Standard Assets
  • Additional Tips for Successful Position Sizing
  • Frequently Asked Questions
  • Key Related Forex Concepts
  • Connected Discoveries
    • Magic Number Collisions Are Quietly Eating Your Portfolio EA Account
    • Your EA’s Position Sizing Is Wrong When You Have More Than One Trade Open
    • DRL Agent Deployment: What Breaks Between Training and Live

Importance of Position Sizing in Forex Trading

Position sizing in Forex trading is essential for both risk management and maximizing potential profits. Accurate position sizing helps traders:

  • Protect their trading account from significant losses.
  • Maintain consistent risk exposure across different trades.
  • Preserve their trading capital for the long term.

Inadequate position sizing can lead to poor risk management, causing large drawdowns or wiping out an entire trading account. A balanced approach to position sizing enables traders to remain in the market and make informed decisions, ensuring long-term success.

In practice, the traders we see fail most often are not those with bad strategies — they are traders who are correct on direction but oversized on entries. A 50-pip adverse move on a 0.01-lot micro position is noise. The same move on a 1.0-lot position against a $1,000 account is a margin call.

For a deeper look at how lot size errors compound inside automated systems, see Your EA Calculates Lot Size Wrong (And Your Broker Won’t Tell You).

Different Position Sizing Methods

There are several methods for calculating position sizes, catering to different trading styles and risk tolerance levels. Some popular methods include:

  • Fixed Percentage: Traders risk a fixed percentage of their account balance on each trade. This method maintains a consistent risk level across trades and adjusts with the account balance. Most client EAs we build use this approach — it scales naturally with account growth.
  • Fixed Amount: Traders risk a predetermined monetary amount on each trade, irrespective of their account balance. This method is simple but may lead to disproportionate risk exposure as account size changes.
  • Volatility-Based: Position sizing is adjusted according to market volatility, typically measured by indicators like the Average True Range (ATR). This method accounts for changing market conditions and reduces risk during periods of high volatility.

Understanding and choosing the right position sizing method for your trading strategy can help you manage risk effectively and improve overall performance.

Examples and Case Studies

To illustrate the importance of proper position sizing, consider two hypothetical traders with a $10,000 account balance:

  • Trader A risks 5% of their account on each trade. After five consecutive losses, their account balance drops to $7,696.93 — a 23% decline.
  • Trader B risks 1% of their account on each trade. After five consecutive losses, their account balance drops to $9,513.58 — a 4.86% decline.

This example highlights how smaller position sizes help protect a trader’s account and preserve capital for future trades. The deeper implication: Trader A needs a 30% gain just to return to break-even after those five losses. Trader B needs less than 5%. The math compounds in both directions.

Using the MT4 Position Size Calculator

Our free MT4 Position Size Calculator simplifies the process of calculating the appropriate position size. Follow these steps:

  1. Download the MT4 Position Size Calculator and save the `.ex4` file to your MT4 terminal’s `MQL4/Indicators/` folder.
  2. Restart MT4, or right-click the Indicators folder in the Navigator and select Refresh.
  3. Double-click the indicator in the Navigator to attach it to your chart.
  4. Set the Risk Percent input to the percentage of your account equity you’re willing to risk on this trade. If your broker adds suffixes to symbol names (e.g., EURUSDi, EURUSDpro), set the Symbol Suffix parameter accordingly.
  5. Drag the displayed line to your desired stop-loss level, then click the Lot Size button to calculate the appropriate position size.
MT4 Position Size Calculator panel showing 1% risk setting, $10,000 equity, and 0.10 calculated lot size

The calculated lot size appears directly in the panel on the chart.

For traders building EAs that automate this calculation, see our MQL4 programming guide — position sizing implementation is one of the core topics covered.

Broker Compatibility: Symbol Suffixes and Non-Standard Assets

Most brokers use standard symbol names (EURUSD, GBPUSD, USDJPY). Some add a broker-specific suffix — EURUSDpro, EURUSDi, EURUSD….. — for regulatory or liquidity provider reasons. If the indicator displays an “Unknown symbol” error in the Experts tab, this is almost always a suffix issue.

Fix: Open the indicator settings and enter only the suffix in the Symbol Suffix input field. Examples:

  • Broker shows `EURUSDi` → enter `i`
  • Broker shows `EURUSDpro` → enter `pro`
  • Broker shows `EURUSD…..` → enter `…..`

For indices and commodities (US30, US500, NAS100, XAUUSD): The pip value calculation is optimized for standard forex pairs. Instruments with non-standard contract sizes or multipliers — including most indices and some commodities — may produce incorrect lot size readings. Cross-reference with your broker’s contract specification sheet or margin calculator before placing trades on these assets.

For JPY pairs: The indicator handles JPY pairs correctly using a 2-decimal pip structure. If you see calculation errors on JPY pairs, check the symbol suffix first.

Additional Tips for Successful Position Sizing

Apart from using our MT4 Position Size Calculator, consider the following:

  • Review your trading strategy regularly to ensure that your position-sizing methods still align with your overall risk tolerance and trading objectives.
  • Adjust your position sizes based on market conditions or changes in your personal financial situation.
  • Keep a trading journal to track your position sizes, risk exposure, and overall performance. Analyze periodically to identify areas for improvement.

Frequently Asked Questions

How does the MT4 Position Size Calculator handle different account currencies?

The indicator reads your live account equity from MetaTrader and uses the current ask price to convert pip values to your account’s base currency. If your account is denominated in EUR, GBP, JPY, or another currency, the conversion happens automatically using live exchange rates from your broker’s feed — no manual adjustment is needed.

Note: the calculator uses account equity, not account balance. Equity includes the floating profit or loss of any open positions. This gives a more accurate picture of available capital when sizing new trades and prevents oversizing entries when you already have open drawdown.

Can the calculator be used for multiple assets, including commodities and indices?

For standard forex pairs — major, minor, and most exotic pairs — the calculator works correctly on any symbol in your broker’s offering. For commodities (XAUUSD, XAGUSD) and indices (US30, US500, NAS100, GER40), results vary by broker.

These instruments have non-standard contract sizes and pip multipliers that can cause pip value calculations to produce incorrect lot sizes. If you trade these assets, verify the calculator’s output against your broker’s own margin or position size calculator before entering the trade. We are aware of this limitation and it is on the list for a future version.

How do I adjust the calculator settings for different position sizing methods?

The calculator implements fixed-percentage sizing by default. Set your risk percentage in the Risk Percent input parameter — you can also change this directly from the panel on the chart without reopening the settings dialog.

For fixed-amount sizing: calculate the equivalent percentage manually (risk amount ÷ account equity × 100) and enter that value as your risk percentage.

For volatility-based sizing: calculate your stop-loss distance using your ATR reading first, then drag the indicator line to that level before clicking Lot Size. The calculator handles the lot size computation from the stop distance you provide.

Key Related Forex Concepts

Understanding these concepts is essential when interpreting the calculator’s output.

  • Forex pip: the smallest standard price movement in a currency pair — the fourth decimal for most pairs, second decimal for JPY pairs.
  • Currency pair: the exchange rate between two currencies traded in the forex market (e.g., EURUSD).
  • Base currency: the first currency in a pair quotation — EUR in EURUSD.
  • Quote currency: the second currency in a pair quotation — USD in EURUSD. Pip values are denominated in the quote currency.
  • Account balance: total cash in a trading account, excluding open position P&L.
  • Account equity: account balance adjusted for floating P&L on all open positions. The calculator uses equity.
  • Forex lot: standardized trade size unit. One standard lot = 100,000 units of base currency. Mini lot = 10,000. Micro lot = 1,000.
  • Stop-loss: a pending order that closes your position if price moves against you by a specified distance — the primary input the calculator uses to determine your risk per trade.

If you need a position size calculator built directly into a custom EA, see our MT4 programming services or request a free quote.

  • LinkedIn
  • Facebook
  • Telegram
  • Instagram
  • Mail
  • YouTube

Connected Discoveries


Unraveling Ideas That Inspire.


Two expert advisors with the same magic number colliding at a shared MetaTrader order pool — illustrating how unguarded OrderSelect loops act on positions they did not place

Magic Number Collisions Are Quietly Eating Your Portfolio EA Account

May 19, 2026

Three clients came to us this year with the same problem: a…

Continue Reading Magic Number Collisions Are Quietly Eating Your Portfolio EA Account

MQL5 code comparison showing AccountBalance() vs AccountEquity() for multi-position EA lot-size calculation

Your EA’s Position Sizing Is Wrong When You Have More Than One Trade Open

May 11, 2026

Three clients brought me the same EA rescue brief this year: a…

Continue Reading Your EA’s Position Sizing Is Wrong When You Have More Than One Trade Open

Diagram showing the structural gap between a DRL training pipeline and its production bridge deployment, representing the feature parity problem in live trading.

DRL Agent Deployment: What Breaks Between Training and Live

May 7, 2026

Most DRL agent deployment failures are not model failures — they are…

Continue Reading DRL Agent Deployment: What Breaks Between Training and Live

Written by:
barmenteros FX
Published on:
June 4, 2019
Last Updated:
May 2, 2026
Thoughts:
37 Comments

Categories: Blog

Reader Interactions

Comments

  1. Dave

    July 17, 2023 at 04:00

    The google drive download link says 403 error not found. Can y0u re-upload it?

    Thanks

    Reply
    • barmenteros FX

      July 17, 2023 at 09:37

      Hi Dave,

      Thank you for bringing this to our attention. We’ve just tested the Google Drive link and it appears to be working correctly on our end. However, we understand that you’re experiencing issues with it.

      To ensure you receive the file without further delay, we’re going to send it directly to your email. We hope this resolves the issue for you.

      Thank you for your patience and cooperation. Should you encounter any further issues, please don’t hesitate to let us know.

      Reply
  2. reza

    October 22, 2022 at 01:23

    you are just the best. thank you so much for this simple and very useful indicator. this indicator literally saved me

    Reply
    • barmenteros FX

      October 23, 2022 at 13:05

      Glad to hear it. Thanks for your comment

      Reply
  3. ibill

    February 11, 2022 at 08:22

    Thanks for this indicator. It’s nice and useful.
    However, for indices instruments like US30/US500/US2000 etc, the lot size is not correct. I suspect it is related the different specification (digits/contract size) from currencies instruments?

    Reply
    • barmenteros FX

      February 11, 2022 at 19:28

      Hi. Thanks for your feedback. Can you send us a screenshot showing an example of wrong lot size and what should be the correct size in this case? If possible, tell us what calculation you use for getting the lot size or if you use a different tool to get the right size calculation. Best regards

      Reply
  4. Rex Amadi-Woluchor

    May 26, 2021 at 21:30

    Please accept my thanks for this wonderful script!

    Reply
    • barmenteros FX

      May 26, 2021 at 22:43

      Thank you for your comment. You’re welcome. Best regards

      Reply
  5. ALEXANDER DOLL

    January 13, 2021 at 08:05

    Thank you for this little gem, very handy.

    Reply
    • barmenteros FX

      January 13, 2021 at 08:52

      You’re welcome, Alexander. Regards

      Reply
  6. Ese

    January 8, 2021 at 08:10

    I tried the current version of the tool v1.2., but it does not work.

    Reply
  7. Ese

    January 8, 2021 at 07:32

    I tried using the calculator but it does not work. When I click the Lot size button it does not show the size.
    I see the following messages in ‘Experts’ tab of Terminal window.
    2021.01.08 01:10:10.220 Lot Size Calculator v1.2 AUDJPYi,H4: GetPipValue » fail to get pip value for AUDJPYi

    2021.01.08 01:18:39.218 Lot Size Calculator v1.2 AUDJPYi,H4: GetPipValue » fail to get pip value for AUDJPYi

    2021.01.08 01:18:39.218 Lot Size Calculator v1.2 AUDJPYi,H4: IsSymbolList » JPYUSD’AUDJPY’ (Unknown symbol)

    2021.01.08 01:08:04.332 Lot Size Calculator v1.2 EURNZDi,H1: IsSymbolList » NZDUSDEURNZD pro >> pro (Unknown symbol)

    2021.01.08 01:06:22.541 Lot Size Calculator v1.2 EURNZDi,H1: GetPipValue » fail to get pip value for EURNZDi

    Please what can I do to make it work?
    Regards.

    Reply
    • barmenteros FX

      January 8, 2021 at 10:55

      Hi. Type ‘i’ in ‘Symbol Suffix (eg: XXXXXXpro » pro)’ input parameter of the indicator. Keep us posted. Best regards

      Reply
      • Ese

        January 16, 2021 at 00:51

        Hello, Thanks for you reply, but you instruction is not clear. I do not understand what you mean by ”Type ‘i’ in ‘Symbol Suffix (eg: XXXXXXpro » pro)’ input parameter of the indicator”.
        Please can you show exactly what you want me to input? using AUDUSD pair for example.
        Regards.

        Reply
        • barmenteros FX

          January 16, 2021 at 19:30

          Hi. If the name of your pair is AUDUSD with no suffix, you don’t need to do anything. However, if the name of your pair includes a suffix (e.g.: AUDUSDi) you have to type that ‘i’ in ‘Symbol Suffix (eg: XXXXXXpro » pro)’ input parameter of the indicator as shown in this screenshot: https://snipboard.io/Ivda8L.jpg. Hope it helps you. Regards

          Reply
          • Ese

            January 18, 2021 at 23:39

            Thanks so much. It works.

          • barmenteros FX

            January 18, 2021 at 23:47

            You’re welcome. Regards

  8. Felipe

    September 9, 2020 at 18:50

    Anyway to create two more lines? For Pending order and for TP, that way, the indicator would show the risk reward as well. For the pending order line, we would be able to choose an entry point for the calculation of the lot size and risk reward.
    Better yet if it was made into an EA, that way, it would calculate all of that AND we would just need to click buy/sell button made by the EA.

    What do you say?

    Reply
    • Barmenteros FX Staff

      September 15, 2020 at 23:38

      Hi Felipe,
      Thanks for your recommendations. We’ll take them into consideration for future updates.
      Best regards

      Reply
  9. Dewa Setiawan

    May 2, 2020 at 06:52

    hi, I am Dewa from Bali island Indonesia. I am trying to googling for this type of indicator which can help me for the money management. After I installed to my MT4 it’s look really helpful. only one question for you, this percentage is from the current balance or start balance? i thank you very much hard work making this indicator.

    Reply
    • Barmenteros FX Staff

      May 6, 2020 at 00:37

      Hi Dewa. The indicator uses the account equity. Thanks and best regards

      Reply
  10. Choy Jian Hao

    May 1, 2020 at 05:54

    Came across this site while I was googling for this indicator instead of toggling between website and mt4 to find the lot size base on my risk percentage. All I can say, this indicator really saves time even for just few secs which makes a lot of difference especially in FX trading. Looking forward to improvement and other useful indicators. Keep it up, TS.

    Reply
    • Barmenteros FX Staff

      May 1, 2020 at 11:09

      Hi Choy. Glad to hear that this indicator is useful to you! Thanks for your feedback. Kind regards

      Reply
  11. Tyrone

    April 14, 2020 at 00:27

    I tried using it but it doesnt work. When I click the Lot size button it doesnt show the size. I also have a gray circle on the Lot Size Cal in the navigator tab. I did some research and it seems that I may need to compile the mq4 file as well. DO u have that? or a workaround.

    Reply
    • Barmenteros FX Staff

      April 14, 2020 at 01:53

      Hi Tyrone. Are you getting any error message in ‘Experts’ tab of Terminal window? If so, what’s the message? Otherwise, send us a screenshot showing the error. Gray circle in the navigator tab is not a problem. You don’t need the mq4 file in order for the indicator to run properly. Thanks

      Reply
      • Tyrone

        April 14, 2020 at 07:58

        Thanks fr the quick response. Yes I actually do get an error message. I cant seem to post a screenshot. But the error message says

        “2020.04.14 13:49:20.668 Lot Size Calculator v1.0 CADCHF…..,M15: IsSymbolList » USDCHF (Unknown symbol)”

        “2020.04.14 13:49:20.668 Lot Size Calculator v1.0 CADCHF…..,M15: IsSymbolList » CHFUSD (Unknown symbol)”

        “2020.04.14 13:49:20.668 Lot Size Calculator v1.0 CADCHF…..,M15: GetPipValue » fail to get pip value for CADCHF…..”

        I think the reason why its not working is due to the naming convention of my broker for the currency pairs. It adds 5 fullstops after the XXXXXX, and maybe that causes the “unknown symbol” error message. Or maybe its something else.

        Reply
        • Barmenteros FX Staff

          April 14, 2020 at 14:59

          Thanks for the report. A new version is available now. You can enter the suffix of your symbols in the input parameter ‘Symbol Suffix (eg: XXXXXXpro » pro)’, so if your symbol is ‘CADCHF…..’ you should enter ‘…..’ in the input parameter ‘Symbol Suffix (eg: XXXXXXpro » pro)’. This new version also shows the risk percent in the panel so the user will be able to change it directly from the panel. Best regards

          Reply
          • Tyrone

            April 14, 2020 at 15:11

            Omg, thank you so much, it works like a charm now. Also love the new feature. You rock!!!

          • Barmenteros FX Staff

            April 14, 2020 at 15:22

            Glad to hear it. Thanks for the feedback. All the success

  12. Jason

    April 13, 2020 at 21:59

    Great Indicator guys. so simple and yet so useful. Kudos !

    Reply
    • Barmenteros FX Staff

      April 13, 2020 at 23:59

      Glad to hear it, Jason! Thanks for your feedback. Best regards

      Reply
  13. justice

    April 9, 2020 at 12:37

    hello i cant find the place to put the % amount am willing to risk

    Reply
    • Barmenteros FX Staff

      April 9, 2020 at 12:44

      Hi. You can set the risk in the input parameter ‘Risk Percent’. Regards

      Reply
  14. Donovan

    April 4, 2020 at 00:14

    How do i take this off of my chart, even when its deleted it wont get off

    Reply
    • Barmenteros FX Staff

      April 4, 2020 at 00:23

      Hi. Just click on the closing icon [X] on the top right corner of the indicator’s window. Regards

      Reply
    • ANTHONY

      August 29, 2020 at 10:43

      How do I use it on an JPY FX pair, it does not work.

      Reply
      • Barmenteros FX Staff

        September 2, 2020 at 00:15

        Please, send us a screenshot to [email protected] showing what’s not working. Thanks

        Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Explore more

Get a Free Quote Get Inspiration Get Connected

Footer

barmenteros FX

Avenida Principe Salman, 6, 5th
29603 Marbella (Malaga) — Spain

Copyright © 2026

Footer

COMPANY

  • Home
  • About barmenteros FX
  • Contact
  • Request Quote

SERVICES

  • EA Programming
  • MT4 Programming
  • MT5 Programming
  • MQL4 Programming
  • MQL5 Programming
  • EA Debugging and Code Review
  • TradingView Programming
  • NinjaTrader Programming
  • cTrader Programming
  • Forex Programming
  • Machine Learning For Trading
  • Python to MetaTrader Integration
  • Deep Reinforcement Learning for Trading
  • MetaTrader 4/5 License Management
  • All Services

PRODUCTS

  • My account
  • LicenseShield – MT4/MT5 License Protection
  • Latest Offers
  • MT4 Indicators
  • MT5 Indicators

LEGAL

  • Terms and Conditions
  • Privacy Policy
  • Cookies Policy
  • Risk Disclosure
  • Payments & Refunds Policy
  • Warranty & Support Policy
  • Intellectual Property Notice
  • General Disclaimer