I made a video some time ago for one of my students and in it I explained how to go about testing your expert advisors. One of the things I mention in the video is the fact that due to the way Strategy Tester works, it's never to be trusted 100%
Now initially that may sound a bit shocking to you but it's really not that big a deal.
The Strategy Tester in MT4 isn't intended to give you a reliable representation of exactly how an expert advisor will perform in a live market. If you think about it for a moment the idea that it ever could is a bit ridiculous.
By it's very nature the live Forex market is unpredictable just like everything else in life that involves human interaction.
Markets are made up of humans and come complete with all the baggage that we all carry. Emotions, fear, greed etc. There's absolutely no way that a computer would ever be able to emulate those things... it's impossible.
What about 'acts of God'? How would a computerized testing system be able to account for those? Do you honestly think that if you ran a test on an expert advisor around September, 9th 2001, that it would have accurately reflected the events that unfolded?
Obviously it wouldn't have done... but accepting that and also considering it's limitations, Strategy Tester is still a useful tool if used correctly.
The best way to use it, and the way I recommend to all my students, is mostly as a means to check the functionality of your EA's
If you have a new EA that you've bought, found or created then one of the first things you should do is run it through Strategy Tester over the last 3-6 months. Sure you're going to be interested to see if it performs well but much more importantly, you should be checking that it actually does what it's supposed to do.
If it's meant to open up a trade according to certain conditions or at certain stages in the market, is it actually doing those things.
This is something that's really important but most people don't even think about it. They happily accept the word of a complete strange who may or may not have thoroughly tested it themselves. Would you ever do that in any other part of your life? I'm guessing not. If you wouldn't do it normally then why would you do it in this case?
90% Modelling quality... or even less !!!
If you've tested a few EA's then you may have noticed that the report your can see when clicking on the 'Report' tab, has something called 'modelling quality'. That's basically an indication of how reliable or not MT4 thinks the results are based on the quality of the data that was used.
The most you can get by default is going to be 90% but there are a few things you can do to actually get 99% but that would be a subject for another article. If you're interested though you can do a search on Google and you'll find quite a few tutorials that will walk you through the process.
The historical data that is used when back testing is the data that is supplied by your broker which might not be as accurate as you would think. There may be missing tick data or even whole candles. What this then means is that the back test will never be able to accurately portray what would have really happened in the past. Again you can download better data from various places online if you really want to get an accurate representation.
If you do this then you must make sure to disconnect from your broker while testing or better yet, have a dedicated installation of MT4 that you use just for testing. If you're online and connected to your broker then MT4 will try to download fresh data if the data it has doesn't match what the broker has and so your results will vary wildly.
Another issue that can cause problems is 'spread'. Spreads can fluctuate by large amounts in a real-world scenario and your data might not show all of those variations. Just like with the historical data the spread will change during each test if you're connected to your broker.
The best thing to do is to have the most accurate historical data you can find and use a dedicated installation of MT4 that's not connected to your broker.
What The heck should we do?
Personally I only use ST for testing functionality but there are a few things you can do if you want to test for the likelihood of a profitable Forex trading system.
There are one or two tutorials that are available online, you can find them by searching Google. They explain how you can download tick data and configure a testing environment but to be honest they are uber-techy and would give most people a raging headache. I've read them and even as technically inclined guy, I had a hard time.
If you just want to test your strategy rapidly then a program called Forex Tester is ideal. The list of features that it offers are very impressive and a close friend of mine has tested the software and absolutely swears by it.
One important point to remember though is this is not for expert advisors but rather the actual strategy itself. If you have a manual strategy that you're planning on coding into an EA then the software can save you a lot of time and money. You can quickly test and tweak the parameters of your strategy and decide whether it's worth getting it automated or not.
Here's just a few of the things Forex Tester offers but for a complete list you should visit their site.
- A wide range of indicators
- 10 years of historical tick data
- 18 different currencies to test
- Free trial and 30 day money back guarantee
If you take a look at the video that I've posted above then you'll see how easy it is to use Strategy Tester in MetaTrader. It does a great job at doing what it was designed for but it should never be relied upon to tell you whether an EA will be a winner or loser.
Hope you enjoyed this article and please feel free to leave a comment below. I'd love to hear what you think and your comments give me ideas for future articles so don't be shy.