Hire us
Testing Strategies and Indicators on MT4®/MT5®

How to test EAs and Indicators on MetaTrader® Strategy Tester? What should I do to backtest? Let's find out!

6/23/2020 10:00:00 PM

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 in visual testing mode.

However, to test indicators or trading strategies in MetaTrader®, you need to fulfill certain conditions.

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

When you’ve done that, the "Strategy Tester" window will open 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 run manual testing for your strategy. However, this process is tougher than when you’re applying automated backtesting. So, only pros can conduct it. 

Let's focus on how you can test an expert advisor on the MetaTrader® 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 causing inaccurate results.

You can avoid this by navigating to the toolbar and clicking on the "History Center." Click on the relevant testing symbol and click again to display different timeframes. You can import these to your dashboard. A sufficient amount of historical data is crucial to conduct proper backtesting and get accurate results.

When you have fulfilled all these prerequisites, you can move to the head 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®

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

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 select indicators from this menu (as shown below). However, we’ll focus 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 EAs in the strategy tester. Select 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

Choosing Indicator's Tab in the Strategy Tester Window

The indicator's behavior is shown on a chart based on a sequence of ticks simulated in the tester.

There are dozens of indicators you can purchase from the MetaTrader® Market. The testing feature allows you to download and test the demo version's efficiency before buying.

After the download, go to the navigator window, click on the indicator twice, and click on the “Test” button to run the testing process.

Testing the Efficiency of the Demo Version of an Indicator on the Strategy Tester Before Purchase

Testing the Efficiency of the Demo Version of an Indicator on the Strategy Tester Before Purchase

The program selects the indicator. 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 by clicking on "Indicator Properties" before you launch your testing program.

Selecting the Indicator Properties and Keying in Your Parameters Before Launching the Testing Protocol

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 a trading symbol and 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

Selecting the Trading Symbol/Currency Pair

Step 4. Select The Timeframe

Choose a suitable timeframe and testing model. The date range allows you to test EA's specific timeframes and a specific section of history data. Besides using the date range for testing Expert Advisors, you can use them as a model for testing the bar progression.

You’d 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." It offers you the most precise outcome depending on your chosen timeframe.

Step 5. Choose the Spread

Go to the "Spreads" menu and select either the present value or the spread values for six different trading positions (2nd, 5th, 10th, 30th, 50th, or 100th pips). To get a more accurate result, it is crucial 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 choose 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 operations with all of them. Therefore, you can use this element to perform tests on more advanced Expert Advisors that can analyze many currencies simultaneously. Moreover, you can discover how they correlate.

Choosing the Initial Deposit Amount, Timeframe, and the Currency Pair on the Strategy Tester

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 run the testing process.

The performance of the indicator will display on a chart derived from the successions of ticks replicated in the tester. The name of the chart would commonly contain the financial instrument and chosen timeframe with the "visual" feature:

Obtaining Test Results

Obtaining Test Results

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

The displayed results include:

  • total net payout

  • profit/loss ratio

  • the number of times your trade position resulted in positive and negative outcomes.

It will widen your knowledge about how the strategy or indicators would perform in the past with the available historical data. Thanks to this, you will find out how the strategy or indicator would perform in the live trading.

In Conclusion

MetaTrader® Tester helps traders evaluate the effectiveness of an indicator or a trading strategy in a live account using available historical data.

If a specific strategy or indicator shows good results with the historical market conditions, perhaps, it will be efficient 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 go live. With a strategy tester, you need few minutes to test the performance of the indicator or trading robot. You have to do the same for days, weeks, or years in the real market. Isn't backtesting an advantage? 

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 software requirements specification.

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

Our tools. Your future. Everyone profits!

Leave a comment

Сomment will be published after being moderated

All comments

Similar articles