Forex Blog

First-hand Forex trading experience and information about foreign exchange market that will be useful to traders


MetaTrader Panel for Position Size Calculator

September 7, 2016 (Last updated on February 5, 2017) by

In February 2008, I have launched a simple online position size calculator — a tool that helped thousands of traders to open trades based on their risk preference. In March 2012, I have published the first version of position size calculator (PSC) indicator for MetaTrader. Now, 4 years later, I am honored to present the latest iteration in the development of PSC — the position size calculator with a graphical panel:

Position Size Calculator for MetaTrader - Graphical Panel

In addition to an entirely new user interface, the latest version of this position sizing indicator includes:

  • Account currency display.
  • Current leverage display.
  • Custom leverage input for margin calculation.
  • Calculation of the maximum position size with all the available margin.
  • Configuration saving and loading.
  • Compatibility with hedging mode in MT5 (including the trading script).

This video briefly explains how to use this indicator, including placing trades using its outputs:

If you find any bugs in this calculator panel for MetaTrader or if you have some cool ideas to add to it, please post them using the commentary form below.

7 Responses to “MetaTrader Panel for Position Size Calculator”

  1. Jose Antonio

    hello, forgive if not well written am from Spain, and not the English I’m good.
    I downloaded Position Size Calculator, and gives me some thirty compiled errors. I’m not doing wrong. Abusing a little more your patience I have also downloaded the zip PSC-TRADER and you started communicating metatrader I get a screen that does not work. I must be very clumsy. If you could help me I would be very grateful


    Andriy Moraru Reply:

    Please make sure that of the following:
    1. You using MT4 indicator version in MT4 platform or MT5 indicator in MT5 platform.
    2. All files are unzipped into the same subfolder in /MQL4/Indicators/ or /MQL5/Indicators/.
    3. You are compiling .mq4 or .mq5 file, not .mqh.

    Seeing the errors would also help me to understand the problem.


  2. Jose Antonio

    forgives think I have not put well. the version indicator is MT4
    my platform is MT4.
    if I put in the subfolder in / MQL4 / Indicators
    I have compiled the file .mq4


    Andriy Moraru Reply:

    Then, I would need to see the list of errors it outputs when you try to compile it.


  3. Jose Antonio

    Hello, I’ve managed to install it, I again put my broker MT4 clean and working properly, Thanks for everything


  4. Qamar


    The Take-profit button allows quick setting of TP to the level equal to the current SL value.

    Is it possible to change the Take-profit button to set it to 2X the current SL value?


    Andriy Moraru Reply:

    Yes, it is possible to modify the code to make it 2x. I do not want to change it for everyone, but you can make the change in your own version. Change these lines 1341-1342 in PositionSizeCalculator.mqh file:

    	if (tStopLossLevel < tEntryLevel) sets.TakeProfitLevel = tEntryLevel + tEntryLevel - tStopLossLevel;
    	else if (tStopLossLevel > tEntryLevel) sets.TakeProfitLevel = tEntryLevel - tStopLossLevel + tEntryLevel;


    	if (tStopLossLevel < tEntryLevel) sets.TakeProfitLevel = tEntryLevel + (tEntryLevel - tStopLossLevel) * 2;
    	else if (tStopLossLevel > tEntryLevel) sets.TakeProfitLevel = (tEntryLevel - tStopLossLevel) * 2 + tEntryLevel;


Leave a Reply

required (will not be published)