How to Backtest a Metatrader EA the Right Way, Part I
Let’s use MetaTrader’s component called Strategy Tester. It will test an EA using the data which is in the history of MetaTrader. It is very quick method of testing the EA. The drawback of this method is that it may not be always very accurate. Some people say that the inaccuracy of the Strategy Tester makes it a useless tool. Others say that the accuracy is good enough to give a rough idea if the EA is profitable.
I personally think that there is no program that is 100% accurate. However you can configure the Strategy Tester to give you the best results as close as if you have tested manually.
The following are the steps on how to use Strategy
tester, what parameters to set, and what data to use to get the best results.
1). Open the Strategy Tester on your platform.
Simply go to View->Strategy Tester.

2). These are the rules of how to use Strategy Tester
Expert Advisor: Pick an EA that you want to test. If you are using any custom EA make sure it is in the /EXPERTS folder and you can see it in the Expert advisor list window.

Period:
You need to chose period that you are going to test the EA.
There are three methods of modeling:
1. Every tick:
This method is based on the shortest time interval (every tick). This is the most accurate option to backtest the EA
2. Control points:
This method uses 12 last candles in the given period plus fractal method of generation of the previous prices.
3. Open Price Only:
This is the fastest method. It uses only the open price of a candle.
Optimization:
Strategy Tester will optimize the testing of the EA.
Expert Properties:
In this window you can set the initial deposit and trades you want to open - buy, sell or both.

Also you can set stops and limits in this window.

Symbol properties:
This window shows you the properties of currency pair. This information is also written in the header of *.fxt file.

Open chart:
You can open the currency pair chart that you are testing to see the price and indicators that EA is using. Arrows show you entry and exit points. This window can be opened only after testing is performed.

Modify Expert:
You can use this button if you have the source file of your Expert Advisor. It will open up the MetaEditor window where you can modify the code of your EA.
Start:
This button will start the testing of EA.
In the next post I will discuss how you can improve the accuracy of the backtesting. So stay tuned for the next post.














i’ve been looking for this kind of explanation for quite sometime.good explanation, sweet and simple.
Thanks.
i have tried it but nothing turns out. my graph and report is empty. what did i do wrong?
Strategy tester skips the negative results. Probably your history data is not enough for the EA you are testing to show any positive results, or your EA is not profitable at all.
Try to download the history form the history center for all time frames. If that doesn’t help try different EA.