This EA is an evolution of our free online tool and the MetaTrader indicator called Position Size Calculator. Position Sizer is available for both MT4 and MT5, but the MT5 version provides slightly better functionality because the platform itself is more advanced.
The main tab of the panel provides the primary control over the EA's functions and serves to output the most important calculation results: the position size, risk, reward, and risk-to-reward ratio. The following controls and outputs are available:
The risk tab can help you assess current and potential risk and reward profile. Using a simple algorithm, the EA calculates the risk of the currently open positions and pending orders based on their stop-loss levels (or lack thereof). It also assesses the potential reward of already opened positions and the position calculated by the expert advisor based on take-profit levels. The employed risk analysis method does not account for complex situations involving hedged orders and positions. You can use the Risk Calculator indicator for a deeper portfolio risk analysis. You can control the Risk tab using three checkboxes and see the calculation results in ten output fields:
The margin tab provides information about the calculated position's margin, amount of used and available margin after opening the calculated position, and the biggest possible position size considering the current available margin and leverage. The tab has only one input and five output fields:
The swaps tab displays details on the overnight interest payments associated with the current trading instrument and calculated position size. It shows swaps type, nominal swaps, daily, yearly, per lot, per calculated position size, and both for long and short positions:
Using this expert advisor is very simple if your main aim is to calculate the position size based on your stop-loss and the current market parameters and then to execute the trade based on that calculated position size.
You can use the position size output of this EA to open trades manually in the same or some other platform. Alternatively, you can use its trading capability to open trades based on the calculated position size and with the given entry, SL, and TP levels. You can either use the Trade button on the Trading tab or the hotkey (set via input parameters). Additionally, you can turn on more trade buttons: on the Main tab and near the Entry line.
Warning! There is a known issue with using the keyboard shortcut in MT4. If either Shift or Ctrl is used and the Ask for confirmation option is turned on, the shortcut stops working after the first time the confirmation popup appears. That is why the default value for the shortcut in MT4 is just "T". This problem is absent in MT5.
Black background color and chart grid do not interfere with the panel as you can see on this screenshot of the Risk tab. The panel is set to a dark mode, to reduce the screen brightness. The risk outputs show Infinity as there is, apparently, a sell order without stop-loss.
Position Sizer is being developed via a dedicated GitHub repository. You are encouraged to actively participate in the improvement of this EA by submitting your own features via pull-requests and by reviewing existing suggestions, changes, fixes, and so on.
The panel's interface can be translated in MetaTrader 5. Currently, there are five language files available in addition to English: Arabic, Chinese (Simplified), Portuguese (Brazilian), Spanish, Russian, Ukrainian. More languages will be added in the future.
It is actually easy to create your own custom translation of the Position Sizer's interface. It doesn't require any coding skills. The translation file consists of just a few hundred terms and phrases.
Most likely, you need to compile it. To do this, left-click it in the list of expert advisors in MetaTrader's Navigator window and press Enter. MetaEditor will open the EA's source code. Now press F7. See the answer to the question above if there are compilation errors.
To help you with the issue, I would need to know what version of the EA you are using, what version of MetaTrader (including the build number) you are using, and also what broker, account type, and account currency you are trying it on. Additionally, please provide the output in the Experts tab of your Terminal/Toolbox subwindow:
The most probable reason for that is that increasing the position size by the minimum possible increment would lead to a position size with a risk greater than the given percentage. The Position Sizer rounds the position size down in such cases, aiming to reduce the actual risk rather than to overshoot the specified value. You can always set the CalculateUnadjustedPositionSize input parameter to true to make the Position Sizer to show the exact calculated position size, but you won't be able to open such a trade with this broker because it won't comply with the broker's restrictions on the minimum position volume step.
You might want to open a trading account with any of the MT4 Forex brokers to use the Position Sizer for MetaTrader 4. If you want to use an MT5 version of the Position Sizer, feel free to open an account with a broker that offers MetaTrader 5 platform.
However, for some of the presented MetaTrader expert advisors, the code is available in two versions: one version in MQL4 for MT4 and another version in MQL5 for MT5. Please make sure you are using the right code version depending on your platform of choice.
Quick-start your EA creation by selecting one of our templates and have a working EA immediately. Go ahead and try it yourself! Then, start adjusting the EA to match your ideas. Want to start from scratch? Just select the Empty template and add your indicators.
Add standard MetaTrader indicators or search for an indicator in our Web Library. Found your own MT indicator? No problem, upload the Custom Indicator in any MT format, EX or MQL. Then, configure the indicator parameters as you normally do in MT and click Save. Now you are ready to create Trade Signals.
Use trade Signals to define conditions for opening or closing orders. You can use your indicators, functions or fixed values to create any condition you can think of. Add conditions like crossover or price action. Use Drag and drop to rearrange your trade Signal. Click Save when you are done. Now you are ready to further enhance your EA by adding strategy Modules.
Use strategy modules to manage your (open) orders, Stop loss and Take Profit values. You can also prevent orders from being openend by defining trading sessions and only open orders within these sessions. There are modules available for all kind of needs. New modules are added regularly. When done, continue to configure your Money Manager.
Your Money Manager determines how much risk your EA is allowed to take. Set a fixed lot size, a percentage of your account or use the Martingale strategy. Make sure you trade safely by taking low risks. When ready, click Save and you are ready to Run A Backtest.
Run a backtest in the cloud by clicking on Run Backtest. Pick a time period to backtest, choose a test model, a timeframe (M5, M15, H1 etc.) and click Run. Your backtest is queued and ready to be processed. Click on Open to navigate to your backtest. Here you see your backtest dashboard, which shows a test report and the opened and closed orders and deals. When you are happy and want to download your EA, click Export to Metatrader and run it in MetaTrader on your local machine.
When you think it's time to export your EA to MetaTrader, click Export To MetaTrader and select your preferred format (MQL or EX). EX is convenient if you do not need to make changes to your EA or when you are not interested in the source code. If, however, you are interested in the source code, choose MQL. Copy the EA to your MetaTrader's Experts folder to be able to load the EA on the chart. That is it! You now have built your Expert Advisor.
You no longer need to write a single line of code or spend a lot of money on hiring a programmer. You can build your EA with our simple to use tool and use unlimited indicators to replace your manual trading system. We create the code which represents your trading idea in seconds, no matter how complex, so you can focus on maximizing your results. Our high quality MQL code is written by professional programmers who have been programming EA's professionally for decades.
EA Builder Pro has all features to create almost any of your complex custom trading strategies. Features include custom indicators, entry- and exit signals, advanced modules, risk management, export and backtest, including advanced customization features. We hand you all the building blocks you need to build a profitable Expert Advisor and offer you documentation, including a tutorial on our ea builder website to guide you step by step. Once you become proficient with our tool, you'll find out how incredibly fast, powerful and flexible it is.
Backtest your strategies with a single click from the comfort of your sofa, so you can quickly identify profitable expert advisors or make adjustments(*). You can view and download the reports in EA Builder Pro offering you the same look-and-feel which you are already accustomed to from MetaTrader. Reports are displayed in the browser, without leaving our tool, or your sofa. Our always running backtesting service is ready to take on the next testrun. Give it a try for yourself!
When you think you are ready to run your strategy on your own device or VPS, export your strategy for MT4 or MT5. After you've downloaded the file, all you need to do is copy the expert advisor to MetaTrader. You will be able to use the generated inputs for optimizing your strategy additionally. You decide when you are ready for testing on a demo account and when you're ready for live trading. We always stress the importance of running on a demo account for a while first and ask you to verify it's taking the right trades, before running on a live account.
c80f0f1006