NavigationUser loginWho's new
Who's onlineThere are currently 0 users and 33 guests online.
|
MetaTrader Strategy TesterWhen you step into the playground it's the game time where there's no place to test, to mistake or to learn. That's why the most of traders spend months and even years testing thier strategies before going to the show.
How to test your strategy? You've bought the strategy your best friends has told you it'll make you one of the 100 richest forex players by the next summer. Or maybe you have downloaded one of heavily discussed strategies from a forex forum, There are two ways to test your strategy; forward testing and back testing: Forward testing: Forward means you test your strategy on the future market prices not the history data. In this method you test your strategy in a demo account day by day for a sufficient period before you decide is it a successful or not a successful strategy. It’s more accurate method than the back testing but it may take months and even years from you to get assured results and it requires a comfortable seat in front of your computer all the day. Back testing: Back means you test your strategy on the history market data not the future ones. In the method you run the MetaTrader a built-in feature called Strategy Tester which enables you to test your strategy against the already saved history data. It’s a less accurate method but it takes minutes from you to determine was it a good or bad strategy. Back testing debates: The back testing accuracy issue has been heavily debated between the MetaTrader fans. Those fans have been divided to advocated and opponent groups: The opponent group are assuring that the MST (MetaTrader Srategy Tester) is not trustworthy and even a useless. The second group deny these indictments and saying may be that was true for the previous versions of MetaTrader but the strategy tester of the current version is more accurate and trustworthy. I’m personally partial to a third group saying that there’s nothing is 100% accurate but there’s a possibility of better accuracy if we set all the required conditions. We will know how to get the maximum of MST accuracy. Exploring the MetaTrader Strategy Tester: We are going to study the MST with the MACD Sample expert advisor which shipped with MetaTrader. We are not concerned about is it a good strategy or bad but we have chosen it because you and me have it in our machines. To run the MST go to View menu and choose Strategy Tester, that will bring the MST window (Figure 1). (You can click CTRL+R or F6 hot keys to bring the MST).
In the first window (figure 1) you have got when you opened the MST you find the simple yet most important options: Expert advisor: Here you choose the expert advisor you want to test, in our lesson we have chosen Note: The expert advisor must be compiled and placed in the /EXPERTS folder to find it in the Expert advisor list. Symbol: Choose the currency symbol you want to test your strategy on. Note: Trading is permitted for the symbol under test only, no portfolio testing. Attempts to trade using another symbol will return error. Period: Choose the timeframe you want to test your strategy in. Note: Weekly, monthly, and irregular timeframes are not allowed in MST. For more details about MST limits navigate to: tester_limits Model: Determine the method that MST will use for price bars modeling which you want to test your strategy. There are three modeling methods you can choose from: Every tick (on the basis of all available least timeframes with fractal interpolation of every tick) Control points (the nearest timeframe with fractal interpolation are used) Open prices only (the fastest method on the bars completed) Note: The current price bar is fully completed can only be known when the next one appears. Recalculate: MST can use the data already cashed (from a pervious testing) in the .fxt files. Optimization: When you enable this option you can use the MST optimization features, we will discuss these features later in this article. Expert properties: Clicking this button will open the Expert properties window: Where you can set the testing deposit and testing positions (short and long) (Figure 2). Figure 2 - Expert advisor properties Figure 4 - Optimization settings Symbol properties: Clicking this button will open the currency symbol properties window (Figure 5). Note: This information is written down in the header of an *.fxt file and used for server emulation. Figure 5 - Symbol properties Open chart: Clicking this button will create and open a new chart based on the symbol you used in testing and the indicators you used in your expert advisor.The arrows of opening and closing and other objects used in your expert advisor will be drawn on the chart as well (Figure 6). Note: This chart window can be opened only after the testing is over. Figure 6 - MST chart window Modify Expert: Click this button if you want to see or edit the source code of the expert advisor. The expert advisor will be opened in MetaEditor. Start: Clicking this button will strart the testing. We have too much to say about the MetaTrader Strategy Tester (MST) in the next series of articles. I hope you enjoyed the article Coders’ Guru |