How to make a correct backtest of your Expert Advisors in Metatrader 4

Home / How to make a correct backtest of your Expert Advisors in Metatrader 4

How to make a correct backtest of your Expert Advisors in Metatrader 4

 

We have received some emails asking us about how to make a correct backtest of an Expert Advisor or forex robots in Metatrader 4 platform.So we decided to write a quick guide to help some newbie and experienced traders that don´t know how to use the strategy tester feature of Metatrader 4.

The first step is to open the Strategy Tester panel by clicking on View menu in the Metatrader 4 platform then selecting Strategy Tester or pressing the control + R keys.

 

Metatrade4

 

On the bottom part of your MT4 platform, you will see a new window. Choose the EA you installed from the Expert Advisor choices.

 

 

Set the currency pair you want to run the backtests on and the appropriate period by clicking on the menu beside Symbol and Period. Specify the backtesting period by setting your preferred dates and making sure the Use Date box is checked.You can run the visual mode but the backtesting can take more minutes to be completed.The recommended time frame to run your backtest is at least 5 years.

 

History center and history data.

 

Some brokers don´t give you more than 3 years of historical data, we recommend to export and import from other platforms like Jforex the historical data using a file in CSV format or download it from the Forex Tester´s webpage.

To import the file just open the history center in the tools menu inside your Mt4 platform or simply hit F2 key on your keyboard.Choose the currency pair and time frame and select import, then you will see the option to import your CSV file from your computer files.If you want to continue the test without the CSV file, select the time frame and click the download button below.

 

 

You can include the one-minute tick data for more accurate backtest results, but this can use much space on your hard drive and make your computer slow.

 

Ready to run your backtest?

To start running the backtest, choose which Expert Advisor you want to test and click “Expert Properties” to set your desired parameters.

In the “Testing” tab enter initial deposit amount, choose currency and make sure “Long & Short” positions are selected to allow both, BUY and SELL operations.

Most of the Expert Advisors have at least few parameters you can set. In the “Inputs” tab you can set them the way you want for this particular test you can also optimize all parameters and run a more accurate backtest but can take more hours.

After your finish this you need to hit the Start button on the right-hand side of the strategy tester window and when the backtest get finished you will be able to open your first backtest report in the results and graphs tabs.