Trader’s Tech – Writing Your Own EA Part 38 – Strategy Tester

Forex RobotIf you’re new to this series and want to check it out from the beginning, you can find that here. And look here for a list of all the programming articles.

In Part 37 we talked about using the optimization feature of the Strategy Tester (ST), how to interpret the Optimization Graph and Optimization Report tabs and how to pass that data to the inputs to run a more detailed test. This installment we’ll discuss more about the ST report.

Before proceeding with the Report tab, briefly click on the Optimization Results tab. An interesting feature I failed to point out in our last installment is that you can click on any of the titles in the title bar of the report to sort the report by that column. Trader's Tech - Strat Tester 12First time you click a title, it will sort by that column in an ascending fashion (lowest to highest), next click will re-sort in descending fashion (highest to lowest.) A triangle will appear to the right of the title to indicate the direction of the sort. I know that’s pretty much a standard Windows-type function, but MetaQuotes hasn’t implemented too many standard Windows functions into MT4.

Now that we’ve performed a detailed test of one of the sets of inputs derived from our optimization, take another look at the tabs below the ST. You’ll notice the two Optimization tabs are still there. They still contain the results of the last optimization test so we can refer back to them periodically to get the inputs for other detailed tests.

Trader's Tech - Strat Tester 13As I mentioned in the last installment, you can save each individual detailed test report by right-clicking on the report and selecting Save As Report. To the left, you see an example of the report that is generated. I’ve marked several of the available bits of information you can glean from this report. Since I started this series with the understanding that my readers were already traders, I’m not going to go into detail as to how to use this information to vet your strategy. I just want to point out the wealth of information available. As a confessed chart/statistics junkie, this report makes me very happy.

I will point out that every trade taken by the ST is recorded on this report with the results and the account balance. You can also see the percentage of winning/losing trades, the average win/loss size and the number of consecutive wins/losses. All this information is vital in developing a complete strategy that includes money management. The chart is also helpful in determining if the trade is a consistent winner or if it was profitable due to only one or two trades.

In addition to the Report tab, you also have the Results tab, which shows all the trade events (opens, closes, modifications, etc.) The Graph tab, which shows the graph that appears on the report. And the journal tab which shows both the output of the tester (trades that closed or changed due to non-EA events like stopouts) and the Experts Log type events generated by the EA. The journal portion of the ST, like the live Experts Log, is very useful if you are testing an EA for functionality.

We took a detour in discussing the Strategy Tester for use beyond that which we as programmers would use it. Normally a programmer would not need to analyze the effectiveness of the strategy – we would have to put our trader’s hat back on if we were going to do that. But since we’ve already fallen off that bridge, we may as well hit the water swimming. Next installment we’ll discuss getting good data for testing your strategy. After that, we’ll jump back into cool new modifications for our EA. But for now, we’ll just wrap it up for today.

Thanks for your attention and please follow me on Twitter and LinkedIn.

Tim

 

here_for_you_001

1359774937_facebook 1359774984_linkedin 1359774949_twitter 1359774960_google 1359774973_rss 1360027635_youtube

Connect_With_Winners_Edge

Get trade set ups everyday!

 

 

Follow our social media:
1359774937_facebook 1359774984_linkedin 1359774949_twitter 1359774960_google 1359774973_rss 1360027635_youtube

Winner’s Edge Trading, as seen on:

Winner's Edge Trading in the news

  • Dave Hanna

    On the subject of data for your strategy tester, I can’t seem to get it to generate results any older than about a month, regardless of what I put in for the dates, or even whether or not I check the “Use date” box. I have set the “Maximum History” and “Maximum Bar Count” in the Options to their maximum values, and downloaded history from the History Center, and it doesn’t seem to make a difference.

    Also, when I click the “Symbol” drop down box in the strategy tester, there are only a subset of the symbols the broker offers. Specifically, GBPCAD is not there, and that’s one I’m trying to test with. Any hints?

    Thanks for your good work, Tim.