• Home
  • Blog
  • Testing Strategies and Indicators on MT4®/MT5®

Testing Strategies and Indicators on MT4®/MT5®

6/25/2020 10:00:00 PM

Backtesting Strategies and Indicators Applying MT4®/MT5®

One of the most helpful MetaTrader® features is a Strategy Tester. You can use it to test auto-trading robots (or Expert Advisors) and trading indicators in the visual testing mode.

However, to backtest indicators or trading strategies in MetaTrader®, you need to fulfill the following conditions:

1. Enable the Strategy Tester. Head to the "View" menu located in the upper-right corner of the dashboard. Click on the "Strategy Tester."

When you have done it, the "Strategy Tester" window will open on the lower section of the screen. It 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 backtesting available indicators and Expert Advisors, you can run manual testing for your custom strategy. However, this process is tougher than when you are applying automated backtesting. So, only pros can conduct it. 

Let's focus on how you can test an Expert Advisor using the MetaTrader® platform.

2. Download the suitable historical data for the particular trading instrument you want to test. MetaTrader® platform does not provide complete historical data causing inaccurate results.

You can avoid this by navigating to the toolbar and clicking on "History Center." Click on the relevant testing symbol and click again to display different timeframes. You can import them 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, move to the head testing process.

Testing Strategies/Indicators on MetaTrader 4/5®: Step-by-Step Tips

Open MetaTrader® on the 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 will 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/Auto-trading Robot

Indicator/Expert Advisor Tab on Strategy Tester WindowIndicator/Expert Advisor Tab on Strategy Tester Window

We have selected the Expert Advisor as our testing element in the above screenshot. After that, click on the particular Expert Advisor (EA) program.

You can select indicators from this menu (as shown below). However, we will focus more on EAs in this guide.

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

Selecting and Configuring 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. You will automatically activate the visual mode by clicking on indicators.

Choosing Indicator's Tab in the Strategy Tester WindowChoosing Indicator's Tab in the Strategy Tester Window

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

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

After downloading, 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 PurchaseTesting 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 are 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 ProtocolSelecting the Indicator Properties and Keying in Your Parameters Before Launching the Testing Protocol

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

Step 3. Select the Trading Symbol

Choose a trading symbol and a currency pair you want to test. The number of accessible instruments placed in the drop-down menu will depend on the symbol you select when clicking the "Market Watch" menu.

Selecting the Trading Symbol/Currency PairSelecting the Trading Symbol/Currency Pair

Step 4. Select The Timeframe

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

You should select from seven timeframes and three models. These models are:

  •  "Control points"
  • "Open prices"
  •  "Every tick"

The most helpful option on the MetaTrader® platform 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). It is crucial to select the present value to get a more accurate result.

Step 6. Choose the Initial Deposit and the Currency Pair

Click on the "Expert properties" tab. It will take you to a window where you can select a currency, an initial deposit amount, and a position type. You can choose both a long and short position.

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 TesterChoosing the Initial Deposit Amount, Timeframe, and the Currency Pair on the Strategy Tester

Step 7. Get Your Testing Results

Click on the “Start" button to run the testing process when you have got all the parameters set.

The indicator performance 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 the selected timeframe with the "Visual" feature:

Obtaining Test ResultsObtaining 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 a few 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 the indicator would perform in the past. Thanks to this feature, you will find how your tools would perform in live trading.

In Conclusion

MetaTrader® Strategy 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, it will be efficient in real market conditions.

The key benefit of Strategy Tester is that it helps you to evaluate the tool performance before you go live. With Strategy Tester, you need a few minutes to test the viability of the indicator or the 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 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!


Do you doubt the reliability of the indicator? Want to check if there is no redrawing? Need an expert programmer to develop a custom Forex indicator? We will do it for you! Just fill in a form and get a free estimate of the price and time needed to develop the desired tool.

  • Home
  • Blog
  • Forex repainting indicators: the essence of problem and methods of struggle