So you’ve just gotten your hands on a hot new expert advisor and you need to know if this thing is really going to work. It’s time to get your hands dirty and start testing. There are two types of testing you should do: forward testing and backtesting.
But first, make sure you have high quality minute data for your backtest. Read this article on Downloading and Setting up History Data to Get 90% Backtesting Quality.
Forward testing simply means to open a demo account and run the expert advisor in real time to see how it works and performs. Forward testing is essential, however it takes a lot of time before you get a good idea about how the expert advisor will perform. Instead of relying solely on forward testing, we can also perform backtests.
Backtesting lets you test years of data in just minutes. So, before we decide to spend a lot of time forward testing, we can use Metatrader’s Strategy Tester to see how it will perform long term.
Strategy Tester also allows you to optimize your expert advisor. See the optimization article on this.
Before you start backtesting you will need to make sure you have complete and accurate history data set up. If your modeling quality is less than 90% or you see mismatched chart errors, then your data is insufficient.
To download history data and learn how to set it up, read this article: How To Set Up Metatrader History Data And Get 90% Backtesting Quality
Strategy Tester Backtest Settings
Now that you have your history data set up, let’s start backtesing!
To open the Metatrader backtesting window, select from the top menu: VIEW > STRATEGY TESTER (or Ctrl + R for the shortcut). The window should open in the bottom of the terminal and look something like this:
Most of the Strategy Tester input values are pretty self explanatory. First, select your Expert Advisor and the Symbol of the currency pair you want to test.
For Model enter Every Tick (the most precise method based on all available least timeframes to generate each tick). This mode allows to model price movement within a bar the most precisely.
For Period enter the time frame you want.
Leave Optimization unchecked for the moment.
Check Use Date and select the start time and end time that you want to test. Make sure you have quality history data for this time period.
Select Visual Mode only if you want a visually step through the backtesting. Go ahead and try this to see how it works. It is a good tool for checking the logic of your expert advisor and to spot any errors. However, it does take a little more time to perform, so you might not want to always use this.
Next, click on the Expert properties button on the right.
Select the TESTING tab. Enter an Initial Deposit value and leave everything else the same.
Select the INPUTS tab. This is where you enter any input values for your expert advisor. These will vary depending on your own EA. Change what you want, or leave the default settings.
Don’t worry about the OPTIMIZATION tab for now. Click OK to close the box.
Now you are ready to start your back test. Hit the START button and let’s see what results we get. Depending on your EA and computer memory, it may take several minutes to hours to complete.
Once your backtest has completed, it is time to Analyzing the backtest results
Original article source: The Trade Machine (c)