Testing Strategies and Indicators on MT4®/MT5®

Learn how to test EAs and Indicators on MetaTrader® Strategy Tester | 4xdev

23 June 2020

Testing strategies and Indicators on MT4®/MT5®

MetaTrader® trading platform features a Strategy Tester that you can use to test auto-trading robots (or Expert Advisors) and trading indicators. You can do this in the visual testing mode. However, to test indicators or trading strategies in MetaTrader®, you need to fulfil certain conditions.

MetaTrader®, MetaTrader 5®, MT4®, MT5® are the registered trademarks of MetaQuotes Software Corp. | 4xDev.com is not associated with MetaQuotes Software Corp.

1. Enable the Strategy Tester. To do this, head to the View menu located at the upper-right corner of the dashboard and click on the Strategy Tester.

When you’ve done that, the Strategy Tester window will open. You’ll see this on the lower section of the screen. This is where the entire MetaTrader® testing procedures take place. The window contains both the Expert Advisors and indicators testing elements. You can select your preferred element and move on with the testing process.

Besides testing available indicators and expert advisors, you can equally do manual testing for your strategy if you’re well experienced. The process to do this, nonetheless, is a lot more convoluted than when you’re doing automated backtesting.

Our focus in this article is on how you can test an expert advisor on the MetaTrader’s® platform.

2. Download the suitable historical data for the particular trading instrument you want to test. MetaTrader® platform doesn’t frequently provide complete historical data and this can result in inaccurate results.

You can avoid this by navigating to the Tools menu and clicking on the History Center. Then, click on the relevant testing symbol and click again to display different time frames. You can now import these to your dashboard. This will provide you with a sufficient amount of historical data to conduct your backtesting.

When you have fulfilled all these prerequisites, you can move to the main testing process.

Testing Strategies/Indicators on MetaTrader 4/5®: Step by step tips

Open MetaTrader on Dashboard to do the following steps:

Step 1: Click on the Strategy Tester

Head to the lower part of the screen and click on the Strategy tester. As soon as the window opens, you’ll see different tabs and drop-down menus for various features.

The Strategy Tester window on MetaTrader®

Step 2. Click on Indicator/ Expert Advisor or Auto-trading robot

Indicator/ Expert Advisor tab on Strategy Tester window

In the above screenshot, we have selected the Expert Advisor as our testing element. After that, click on the particular Expert Advisor (EA) program. You can equally select indicators from this menu, as shown below, but we’ll concentrate more on EA in this guide.

For reference sake, follow the steps below to set up your indicators for testing.

Selecting and setting up an Indicator

If you want to test an indicator, choose "Indicators" instead of EA in the strategy tester as shown below, and choose the particular indicator from the menu. The menu contains indicators available in the terminal folder and subfolders of MQL4®\Indicators. By clicking on indicators, you’ll automatically activate the visual mode.

Choosing Indicator's tab in the Strategy Tester window

The behavior of the indicator is shown on a chart, which is plotted based on a sequence of ticks simulated in the tester.

There are many different types of indicators you can purchase from the MetaTrader® Market. However, the testing feature allows you to download and test the demo version's efficiency before you buy it. After the download, go to the navigator window, click on the indicator twice, and click on the “Test” button to begin the testing process.

Testing the efficiency of the demo version of an indicator on the Strategy Tester before purchase

The program selects the indicator and the only thing you need to do is to key in your parameters and launch the testing protocol.

If you’re testing an indicator with input parameters, set these up before you launch your testing program by clicking on "Indicator Properties".

Selecting the indicator properties and keying in your parameters before launching the testing protocol

Before launching your test, you must equally choose a test symbol and a timeframe you want the test to be based on. This will provide you with data for the test.

Step 3: Select the trading symbol

Select your desired trading symbol and in this case, a currency pair you want to test. The number of accessible instruments in the drop-down menu will depend on the symbol you choose when you click the Market Watch menu.

Selecting the trading symbol/currency pair

Step 4: Select The Time Frame

Choose a suitable time frame and testing Model. The date range only makes it possible for you to test experts' specific time frames and not on the entire accessible data. This is especially handy when you need to carry on tests on a specific section of history data. Besides using date range for testing Expert Advisors, you can equally use them as a model for testing the progression of bars.

You’d normally select from seven timeframes and three Models. These models are:

  • Control points

  • Open prices

  • Every tick

According to the MetaTrader® platform, the best option is Every tick because it’ll offer you the most precise outcome depending on your chosen timeframe.

Step 5: Choose the spread

Now, go to the Spreads menu and select either the present value or the spread values for six different trading positions which can be (2nd, 5th, 10th, 30th, 50th, or one hundredth’s pips). The get a more accurate result, it is best to select the present value.

Step 6: Choose the initial deposit and the currency pair

Click on the ‘Expert properties’ tab. This will take you to a window where you can select the currency, initial deposit amount, and whether you’re going long or short. You can equally select both a long and short position. Here is where you key in more detail about the position you want to test.

With MetaTrader® Strategy Tester, you can test Expert Advisors on many currencies. So, with your trading robot, you can gain access to the entire financial instruments in the tester. It equally allows you to carry out trading transactions with all of them. Therefore, you can use this element to perform tests on more advanced Expert Advisors which can analyse many currencies at the same time and discover how they correlate with one another.

Choosing the initial deposit amount, timeframe and the currency pair on the Strategy Tester

Step 7: Get your testing results

When you’ve got all your parameters set, click on the “Start button” to begin the testing process. The performance of the indicator will display on a chart. This chart is automatically derived from the successions of ticks replicated in the tester. The name of the chart would commonly contain the financial instrument, your chosen timeframe with the "visual" feature attached in the end as shown below:

Obtaining testing results

However, for the EA, the performance would be shown in the Results tab of the strategy tester. The time it takes for this to be displayed ranges from a few seconds to minutes. It depends on your chosen timeframe and computing power of your PC.

The displayed results will include basic data like total net payout, profit, loss, the number of times your trade position resulted in positive and negative outcomes, and so on.

You will widen knowledge about how the strategy or Indicators would perform in the past with the available historical data. This will equally give you an idea of how the strategy or indicator would perform in the current time used for live trading.

Conclusion

MetaTrader® Tester helps traders to access how effective an indicator or a trading strategy would be in a live account with the use of available historical data.

If a specific strategy or indicator produces a promising result with the historical market conditions, it gives you an indication of how efficient they will be in real market conditions.

The key benefit of the strategy tester is that it helps you to access the performance of a trading robot or an indicator before you use them to trade live accounts. Besides, with a strategy tester, you only need few minutes to test the performance of the indicator or trading robot compared to when you have to do the same for days, weeks, or years in the real market.

If you are interested in a custom indicator, you can order it here. A ready-made form will help you not to forget important aspects of your technical specification.

If you still have questions, feel free to ask them in the comments below.

You are free in your final choice and let it be the right one. Everyone profits!

Leave a comment

Сomment will be published after being moderated

All comments

Similar articles

dkdkdkdk

Privacy policy

The 4xdev company (the Company) agrees that all Intellectual Property Objects shall be the sole and exclusive property of the Client and that all Intellectual Property Rights in the Intellectual Property Objects shall belong exclusively to the Client from the time of the creation of the respective Intellectual Property Objects.

Therefore, the indicators, Expert Advisors, or other Intellectual Property Objects we develop for you will not appear on open access and will not be transmitted to third parties.

The Company provides the Client with a guarantee of the work quality for a period of 14 (fourteen) days from the creation and sending a ready-to-use tool to the Client.