Hi All, where is a good place (website etc.) to learn how to do accurate MT4 back-testing, as most of you know I am a converted Oandian and have never traded MT4 prior to FMT. Would be nice to do my own testing in the future. Your help would be appreciated. 🙂
Hi Pod,
Post 6348 Feb 20th from Chris Heath was good reply, although I've still not had time to do it myself yet - post content copied below.
Re: ForexMorningTrade journal
--------------------------------------------------------------------------------
Quote:
Originally Posted by Remraf
A lot of posts seem to revolve around the ability to do backtesting looking for the Holy Grail - is this a dark art only performed by the chosen few - or can anyone have a go at it? - I'd be pleased to be enlightened, as long as it doesn't involve a) Being exceptionally clever, or b) too much time on my hands!
Time for bed
Its basically quite straightforward. This may appear daunting, but its really not difficult.
Once you have it setup, you can quickly test an EA with varying parameters.
Make sure you EA is loaded into MT4. On the chart go into 'View' , at the top, then 'Strategy Tester'. A window opens up below the chart(which you can enlarge, if you want).
Now you can choose your EA, the symbol, timeframe, model accuracy, (Control points for quick, inaccurate test, Every tick for slower, more accurate test).
'Use date' allows you to choose the date range for backtesting. Visual mode allows you to see the trades as they occur on the unfolding chart, but its SLOW.
'Expert properties' shows you the options for the EA, 'Testing' shows initial deposit, currency, and whether you want to test Long only, Short only, or both. (Optimization, you can play with later). ' Inputs' shows the options for the EA , under 'Value', eg Start Time,Stop Loss, Target etc. Click OK to exit - maybe twice.
Once you've set up your EA parameters, pressing 'Start' will magically run the test. The tabs at the bottom of the Testing window change, and you can see a 'Graph' develop, look at the trade 'Results', and , when test is finished, view the 'Report'. (You can save the 'Report' by right clicking on the Report, and clicking on umm.. 'Save as Report.)
You can view the chart with the trades that occurred by clocking on 'Open Chart'. There's an option to modify the EA, only if you have the source code. (Not for FMT, or TMT.)
Optimizing goes a step further. You can get the Strategy tester to run through a series of numbers, eg Stop Loss from 20pips to say 50 pips in steps of 1, and generate a Report.
To do this, click on 'Expert Properties', 'Inputs'. Go to the parameter you're trying to optimize. If the little box, at the far left is white, you can optimize that parameter. Click on the box, and a tick will appear, and set your optimizing setup by setting 'Start' value, eg 20 for Stop, 'Step' for an increase of 1 (ie pip) each time, and 'Stop' value eg 40 . I would advise only optimizing one parameter to start with.
Click OK to exit.
If you look underneath 'Period' on the main Tester screen, you'll see 'Optimization'. Click on that, a tick appears. Click on 'Start'.
An optimization graph tab appears, and an Optimization Results tabs, which are what they say. (You can 'Save as Report', as before.)
The results generated are different from a non-optimised test, and can indicate the best parameter for the EA.
To learn to use the Strategy Tester, it may be best to run a few non optimized tests, with a small date range ( maybe 2 months) - to get you're feet wet with all the available options, and to get familiar with the results, and what they mean.
You can, of course try the different settings you've seen in the Forum.
If you run lomger tests (say, a year or more), you'll see the length of time it takes.
When you optimize, you'll multiply that time by the number of steps in your optimization. It can be hours for say 3-4 year backtesting, covering a lot of steps. (Unless you have a spare Tianhe-1A computer.)
That is a very brief overview, but should get you going. Then you'll discover the nuances of backtesting on MT4. And quite possibly drive yourself mad. But don't concern yourself with that just yet!
Good luck! Chris