25.11.21 Black Friday!!!

A discount has started for all programs -20% - 55%
Discount last 02.12.2021

An update for the advisor is being actively developed VR Smart Grid

We are in social networks
trading-go.net russian version
Trading-go.net English version
Apply

How to check a Forex Expert Advisor

Written and compiled scripts, so-called Expert Advisors, can be run on the MetaTrader 4 and 5 terminals. Many professional traders create such software for personal use and for sale. This provoked the emergence of a whole market of user programs distributed both for free and with the condition of a one-time payment or subscription.

Forex Expert Advisors

How to choose Expert Advisors

High-quality programs for working with the forex market can be found in our store: https://trading-go.ru/advisors/

All our Expert Advisors contain open and re-tested strategies. They were tested not only in demo versions, but also in real conditions. And the test results are attached to each of them. Thanks to this, the trader can get fully automated and well-tested algorithms.

Taking into account the fact that the robot gets access to a real deposit, the right conducted express assessment is of great importance when choosing it. But in real life, many Expert Advisors sellers offer low-quality programs. Therefore, you should not always rely too much on the attached results.

There are only two way to check the program for compliance with the trading strategy, for code errors and for real profitability. Any MetaTrader user can check the effectiveness of the program via the strategy tester or run the program on a training demo account. Let’s take a closer look on both ways of testing.

Testing Expert Advisor in the MetaTrader 4 terminal

In fact, a custom script with the coded strategy for MetaTrader 4 is a ex4 or mql4 file. The trader should ensure the correct path when installing an Expert Advisor, so that it can be run on the MetaTrader 4 platform without problems. It looks like an ordinary file copying, but there is one important feature - – the folder for placing the Expert Advisor files is opened via the running trading terminal.

Step No. 1. The first step for the trader that the Expert Advisor is intended for the MetaTrader 4 terminal. This is usually stated in its description. You should also check the extension (ex4 or mql4).

For demonstration purposes, we will install the VR Smart Grid robot (Expert Advisor), which consists of a single file.

Forex Expert Advisors

Step No. 2. You should launch the MetaTrader 4 trading platform.

Step No. 3. To open the installation folders of the Expert Advisor files, you should to do the following:

  • go to the terminal menu;
  • select the «"File"» tab;
  • click the «"Data catalog"».

Forex Expert Advisors

As a result, the user gets access to the folder window. The MQL4 folder is used to save the Expert Advisor. Indicators, auxiliary libraries, templates, presets, and other software related to the custom configuration of the platform can be saved in it,

Forex Expert Advisors

The authenticity of the names allows you to immediately find where to copy the Expert Advisor files.

Step No. 4. Following the recommendations attached to the Expert Advisor, files with its settings and distribution are distributed to the corresponding folders.

This can be done by taking the extensions as a guide:

  • the Experts directory — ex4 and mql4;
  • the Libraries folder— dll libraries;
  • the Presets folder — presets files.

In our example, the VR Smart Grid file is copied to the Experts folder.

 

Forex Expert Advisors

If the Expert Advisor is installed correctly, its name will appear in the «Navigator», after the MetaTrader 4 restart.

Step No. 5. The final stage befor testing is to download ticks history.

After selecting the instruments you want to work with, it is necessary to press F2. A window opens in which you should to do the following:

  • select the desired currency pair or CFD contract;
  • activate the «"Download"» button.

After that, the green bar will appear at the bottom of the window, which shows the process of downloading the tick history.

Forex Expert Advisors

If the history has been loaded into the MetaTrader 4 terminal before (and no new data has been received from the broker's server), a message appears with a suggestion to reload timeframes. In this case, you should make the suggested update of tick data.

Forex Expert Advisors

Thanks to the downloaded archive of quotations, the strategy tester has a database. It allows you to restore and display candlesticks when recreating the trading history.

Using the strategy tester

Using the strategy tester allows you to test faster. And this way has already proven itself in pre-testing of various scripts.

Preparation of the strategy tester

To manage the strategy tester in the MetaTrader 4 workspace, there is a special window at the bottom. In it, the trader can test or optimize trading systems and keep track of current positions at the same time.

Forex Expert Advisors

The user can open this service at any time. You just need enter the platform menu and select the «"View"» section or use the keyboard shortcuts (Ctrl + R), the combination of which is displayed near the strategy tester menu item.

Forex Expert Advisors

The goal of developers was to make that this application native. Therefore, a trader who knows how to work with the MetaTrader 4 platform can easily use the tester. But some of its functions are quite specific.

Setting up properties of the strategy tester

The Expert Advisor properties are located in the right corner of the strategy tester. They are used to set up test modes.

There are three tabs here:

  • optimization;
  • input parameters;
  • testing.

Optimization is not recommended when the initial run of the Expert Advisor is performed. You should also not attempt to adjust the parameters of the conditions and indicators included in the trading system.

The optimization system uses a « "genetic algorithm" » that can effectively improve the performance of the test. The side result of his work is parameters tailoring for a specific historical period and instrument loaded into the registry.

In real trades, when the robot faced with another form of fluctuations (gaps, volatility, etc.), this is likely to result in significant losses.

The "Testing" tab is used to define various parameters:

  • the starting size of the deposit
  • the currencies;
  • the directions of trade (transactions of only one type or in both directions);
  • the type of optimization.

Forex Expert Advisors

It is important to keep in mind that the Expert Advisor's correct operation during testing is achieved only if the settings (recommended by the developer of the trading network or set by default) are not changed.

The VR Smart Grid robot that we use as an example, has similar custom settings files, which after downloading them should be placed in the Presets folder.

To find them, you need to do the following in the terminal:

  • open the « "Data Catalog" » folder;
  • go to the MQL folder;
  • select Presets.

Forex Expert Advisors

Then, in the strategy tester, you need to click the « "Upload" » button and select the desired file in the window that pops up. Often, the « "Tester" » folder is opened by default when you select a download, so use Windows navigation to open the catalog tree and find the Presets folder.

Forex Expert Advisors

Tester fields

When you open the test service, the default option « "Expert Advisor" » is set. It automatically displays the entire list of robots in the Navigator window and the Experts folder.

Forex Expert Advisors

If you select the second option — indicator, a list of files in the Indicators folder will be displayed.

 

To run the Expert Advisor test, just double-click on its name in the drop-down list. Next, the instrument, according to the quotes of which the effectiveness of the trading system will be checked, is selected in the same way. One click is enough to display it in the settings window.

Using the "Model" function, the testing time and its accuracy are set. Activating the "every tick" method restores historical quotes using all data of the archive, so it is the longest. However, the other two types do not provide an accurate assessment and are used at the stage of testing "trading hypotheses" to save time while searching for ideas.

Forex Expert Advisors

If the user « "tied" » the robot to a long-term strategy where the transactions are opened at the price of opening a bar (candle) at the beginning of trading, then you can use a model with the appropriate name. This is done to "rush" the Expert Advisor through the maximum time period.

The duration and accuracy of the test is affected by the date or length of the historical segment. Some traders believe that the bigger this indicator is the better.

However, practical experience tells a different story:

  • It is much more important to choose a section with the most even (symmetrical) distribution of the upward trend, various volatility levels, flat.
  • A segment from 2,000 to 10,000 bars or candles of the working time frame — selected in the « "Period" » field would be enough.

Starting the testing process, the trader checks the logic of opening and closing transactions. As well as the work of money management:

  • automatic placement of pending orders;
  • fixing profit and losses.

Thanks to the visualization option, the trader can personally observe these processes in the « "High-speed run" » mode of trading sessions.

After setting all the above settings, many launch the test by activating the « "Start" » button. But at the same time, they ignore the « "Spread" » parameter, where the default value is « "Current" ».

This should not be done for the following reasons:

  • When testing at the weekend when the market is closed, the spread on the instruments may be implausibly overstated.
  • In real trades, the spread values can change, besides there will be is necessary to remember about slippages.

Very often, traders input the spread value manually, higher by one point of its real value, in order to protect themselves from losses described above.

Launching the testing

After choosing the method of modeling the trading history and the length of the segment, you can go from the visualization to the input parameters to set the lot size at 0.01. This will help to display the dimension of the test report indicators in points, which will make the analysis of test results convenient.

Testing starts by the « "Start" » button and passes automatically. At the same time, only the segment selected on the visualization is displayed on the chart of the instrument (which appears at the top). For the convenience of observation, the trader is given the opportunity to pause or accelerate. This is done by moving the slider to reduce or expand.

Forex Expert Advisors

If the « "every tick" » method is selected, the candles are recreated in the tester and the price produces fluctuations, almost with reliable accuracy. This allows to display transactions not at the opening and closing price, but directly "inside" the candle.

Analysis of the test results

After the test is finished, new tabs are added to the service, which were not present at the tester startup stage:

  • «Report»
  • «Results»
  • «Graph»
  • «Journal».

In order to preliminary evaluate how effective the trading algorithm is, three methods of checking the results are used:

  • Generalized — with the help of the yield-equity curve graphical analysis.
  • Mathematically — by checking the correspondence of the obtained parameters to valid theoretical values.
  • Step-by-step — considering every transaction on the chart and in the results table.

The stability of the Expert Advisor code is determined by the tester log.    

« Results » tab

It contains a detailed descriptions of the completed or modified trade transactions. You can also view the results of trades and pending orders here. All information is displayed in a convenient table.  

« Graph » tab

There are two fields here. The first one contains two lines: balance is in blue, and the equity is in green. The second one shows a histogram of position size.

Forex Expert Advisors

« Report » tab

This tab displays a table that contains the testing results in numbers.

« Journal » tab

Here the user can get acquainted with a step by step report on the work of the Expert Advisor.

Anyone who wants to start using Expert Advisors in their trading, we recommend visiting our store: https://trading-go.net/advisors/ Here you will find quality programs for working with the market, and you can test them for free.

To write a comment, log in via
To log in, disable the ad blocker and refresh the page.
First, log in to the site.

Articles of your choice

Forex - how much money you can make
How much money you can make in Forex
Forex earning depends on many factors. And every trader should study them to make his trading more efficient. The first thing to do is to choose the right amount of deposit and leverage. It is also important to use a profitable strategy and assess risks. In addition, it is very important to have the right psychological state.
16.11.2021 Comments Read Beginner, Lessons, Help
Leverage in Forex
What leverage is in the forex market
This article will be about what leverage is and how to use it correctly. Thanks to this tool, any strategy can significantly bring more profits. But at the same time, leverage also increases risks. It is therefore important to study all the nuances before using it. To avoid unnecessary risks.
05.11.2021 Comments Read Beginner, Lessons, Help
MetaTrader terminal history
MetaTrader terminal history
In that article, we will tell the history of the MetaTrader trading platform. You will learn when it was created, how it was developed and why it became the most popular terminal for trading in the forex market. You will also learn about the development of the MetaQuotes programming language and the MQL5 Market, which is largest trading application store.
22.06.2021 Comments Read Beginner, Help, Technologies
Why do Forex traders need VPS?
Why do Forex traders need VPS?
In this article, we will explain in detail what a VPS server is, and why professional traders use it for trading. You will also learn how to order a VPS, what you need to pay attention to, how to check and properly configure the server to work with the MetaTrader terminal. In addition, we will show you how to upload indicators, expert Advisors, and scripts to VPS and run smooth trading.
18.05.2021 Comments Read Beginner, Lessons, Help, Technologies
Feedback Top icon