Here is a guide supposed to allow you to reach the modelling quality of 99%.
For the moment, it is only a myth. Up to now, we have never seen a modelling quality of 99%.
Why backtest with 99% modelling quality?
Because it is far more accurate than the widely employed 90% modelling quality approach that uses 1M data and the MT4 strategy tester fractal interpolation option.
It is unfortunately quite easy to create EAs that inadvertently exploit the fractal interpolation algorithm to generate grossly unrealistic profits in backtests. They are typically scalpers that close large numbers of trades with less than 20 pips of profit or loss. Most perform far worse, or are not profitable at all, in live trading.
Many commercial EAs are sold on the basis of these 90% modelling backtests, and the forex forums are littered with disappointed comments from people who did not see the same results when forward testing or trading live.
Because most MT4 users know that something is seriously wrong with 90% modelling quality, a huge amount of energy goes into forward testing EAs that were never destined to be profitable. Forward testing is usually still a necessary final step before committing an EA to live trading, but it is my hope that, by describing this method, traders will be able to focus more productively on truly profitable strategies.
How to get 99% modelling quality in the MT4 strategy tester
Obtain tick data
Logging tick data
The best quality tick data comes from your broker’s live server, but unfortunately most brokers don’t supply it. The reason you need this is that each broker has different data feeds and applies different tick filtering.
This logging EA will record ticks against whatever currency pair you attach it to. The timeframe doesn’t matter. http://www.lightpatch.com/forex/mt_yahoo/TickLoggerForFXT.mq4
It stores log files in experts\files\AAABBB_yyyymmdd_ticks.csv, where AAABBB is the currency pair that you are logging and yyyymmdd is the date you started.
Over time you will get a number of tick log files with different dates. They can be merged into one file using a Windows XP DOS command like this:
copy AAABBB_yyyymmdd_ticks.csv + AAABBB_yyyymmdd_ticks.csv + AAABBB_yyyymmdd_ticks.csv AAABBB_ticks.csv
Note that if you're serious about logging ticks (and more importantly, live trading) then you need to schedule windows updates for only on the weekend.
You want to backtest using tick data now, but you have no data?
A less accurate alternative is to obtain tick data from a supplier, but the advantage is that an existing large historical record exists.
Here is a free source of tick data http://ratedata.gaincapital.com/. The quality may be suspect.
This script will convert the Gain files into FXT format
http://www.lightpatch.com/forex/mt_yahoo/GainTicks2fxt.mq4
Drop it on the chart timeframe that you want the FXT file to be generated in, then copy the AAABBBnn_0.fxt file from experts\files to tester\history
Here you can pay for tick data: www.disktrading.com. Presumably this would be good quality but I haven’t tried them.
Converting tick data into the strategy tester FXT history file format
Store this Metaquotes converter (simple_csv2fxt.mq4) in experts\scripts and compile: http://codebase.mql4.com/516. It requires this header file (FXTheader.mqh) to be stored in experts\include: http://codebase.mql4.com/515
You will get a “Function ReadAndCheckHeader is not referenced” warning, which can be ignored because the function exists in the header file but is not used.
To run the script, first you open the chart for the timeframe and currency pair that you want to test. You then drop the script onto the chart and enter a filename of the logged ticks. This will look like AAABBB_yyyymmdd_ticks.csv. The script produce a filename like AAABBB30_0.fxt in experts\files, The 30 is for 30M timeframe, and the 0 is for tick level. This file then needs to be moved to tester\history. Copy over the existing file if it’s there.
Running the backtest on real ticks
Select a currency pair and timeframe for which you have generated an FXTfile, uncheck “recalculate” and observe the results. Likewise for optimisation. The report should show a modelling accuracy of 99%.



Reply With Quote

