This page is obsolete and no longer maintained. The Tick Data Suite has been rewritten from scratch to allow a much easier operation. Please head to the support page and browse the support articles for information regarding Tick Data Suite v2. In particular, you can take a look at the Quick Start Guide.

The article you are about to read is a detailed description of how to acquire free historical Forex tick data and use it in backtesting MT4 EAs to obtain a 99% modeling quality. If you don’t understand even one of the terms in the previous sentence, it’s probably best to either stop reading now or just purchase the Metatrader Backtesting and Optimization Course.

In general, backtesting using the data from the MT4 history center might be ok for EAs that are not scalping or pip hunting. If you’re dealing with such an EA or any kind of EA that closes trades within 1-15 pips, though, even the smallest feed differences might have a very large impact.

The issue is caused by the Metatrader terminal not having access to the real tick data, but only to minute bar data in the best case, which forces it to give your strategy backtest “false” ticks, generated through a process of interpolation of the data for the smallest timeframe available. This is most likely not important to an EA that uses a stoploss and takeprofit target of over 100 pips, but in the case of EAs that attempt to scalp a few pips here and there, your backtest could be totally misleading.

So, it is very important to try testing using data with a quality as high as possible, which is why I put together some resources, all of which I use in my backtesting when needed.

The article you are reading requires a fair bit of computer proficiency. If you need more detailed instructions or if you run into issues not dealt with in the comments section, I strongly suggest heading to the Guide to Getting Rich with Forex Robots. The guys there have put together some very nice video material detailing 99% backtesting step by step, designed to help the users who are not very experienced when it comes to computers, together with a FAQ with the most common problems you may encounter and with screenshots for each step in the video.

I’ll be honest with you: at first, when I saw the name of the product I thought it would be some bullshit, but then I had to check it out (due to the 99% tools used, part of which are originating from me) and I found it so useful for the less seasoned people that I ended up becoming an affiliate. In addition to the 99% backtesting info, they put together a lot of useful info about EAs, starting from the basics of backtesting, going in detail into money management strategies and also sporting a very thick “how to spot scam EAs” section that will give you a solid idea of what’s happening with many commercial EAs and what are the processes behind them. In a nutshell, if you’re rather new to Forex or if you want a peek behind the curtains of selling EAs, this guide will probably save you a ton of money. On top of it all, they have a very good support system (I’ve had to use it myself) and they are helping people that are stuck with 99% modeling quality backtesting or with other aspects of the guide. The only major flaw I can find is its name: I would’ve rather called it “Guide to avoid Losing Tons of Money with Forex Robots”; other than that, it’s well worth the $87.

These being said, let’s delve into the procedures.

Dukascopy tick data

The broker

Dukascopy is universally acclaimed as one of the best brokers nowadays. Personally, I’ve never had a live account with them so I cannot confirm or deny that, but many people classify it as “the best ECN broker” and I have yet to read bad things about them. From my point of view, their major drawbacks are the lack of a MT4 client (it’s possible to run MT4 EAs, but very tricky) and a rather high minimum deposit limit ($5000 last I checked). However, if you’re looking for a really solid ECN broker and EAs are not your kind of cookie, look no further.

The data

Unlike many other brokers or data feed providers, Dukascopy offers free tick data spanning from April 2007 (for most currencies) to now. Despite being offered at no cost, it’s commercial-quality data and it actually approaches the 99% quality displayed in the strategy tests (which, by the way, is just a number in the FXT header). From what I can tell, it is updated hourly and the source is none other than the Dukascopy data feed server. Bottom line is: I couldn’t wish for a better data quality.

The easy way

If you’d rather skip the whole PHP process described in detail below, there’s an easier way, but it requires you to register a demo account. I’ve used it in the past, but for some reason it didn’t occur to me that I should also post it here for the readers’ convenience until one of the blog readers pointed it out.

So, begin by registering a demo account with Dukascopy and start the JForex platform (or register a live account, the data process is the same). Login using the data in the email you received, then go to the Tools menu and click Historical Tester. In the lower part of the window, the Historical Tester interface should appear; from now on, everything you have to do happens in that part of the window. First, select the symbol that you want the tick data for in the combo box on the left side (EUR/USD is selected by default). If you need the data for any additional symbols, click the small plus sign next to the combo box, which will pop up an Instrument Selector window. Select any other additional symbols that you want the tick data for and click Ok. Ignore the combo box to the right of the plus sign and click the calendar button to its right. Select 2007.03.01 as the start date (no tick data is available before that date) then select an end date of your choice. Note that if you select today’s date you might run into download errors as not all the data is available yet. After you’re done with the period selection, make sure “Ticks” is selected in the combo box below the symbol and click the “Get Data” button.

Very important: if you are not using a locale that has a dot (“.”) as decimal separator, the FXT script will not work with your CSV. If you get broken FXT files, it’s most likely because your decimal separator is a comma and to solve this problem you have to switch to an English locale (via Control Panel -> Regional Settings or Control Panel -> Region and Language), restart JForex, export the CSV files, then switch back to your original locale. If you don’t want to switch your locale, the alternative solution is to use the PHP method below.

At this point, you’re going to have to patiently wait until the progress indicator slowly (exactly how slowly depends on the amount of data you selected) crawls to 100%. If it says “downloading failed”, try again; if it still fails, try a shorter period of time or symbol by symbol in case you selected multiple symbols. If it still fails and you can’t figure it out, just use the PHP method described below.

Assuming the download went fine, you can click the Save Data button and choose the path and the file names for the CSV files for each symbol. Now you can use the JForex2FXT script included in the scripts archive script to convert the data into an FXT; it works just like the Dukascopy2FXT script and you can find instructions on its usage in the “Converting the data to an MT4 format” paragraph below – all you need to do is use JForex2FXT instead of Dukascopy2FXT).

Note: do not confuse JForex2FXT with Dukascopy2FXT, they are different, even though the input parameters are looking identical.

The alternative

Warning: if using this method results in your backtests abruptly stopping in the middle, please try a different method (PHP or JForex).

Tim Cragg started writing an ambitious .NET application named DukasCopier that aims to handle the whole process in an easy, user-friendly fashion. The application is a work in progress and it currently handles downloading the data and exporting the CSV at the same time, thus saving a lot of time when compared to my PHP scripts. Ultimately, it aims to also export the HST and FXT files but those features are not yet available. For those not inclined to sign up for a JForex account and not eager to get into the whole PHP script thing, this is the easiest solution.

The application is compatible with my PHP scripts so you will have to use the Dukascopy2FXT script to further process the resulted CSV files. It is also able to use any existing data downloaded by the PHP scripts by using the same directory structure, saving you the pain of a new download.

Tim asked me to host the application until he finds a more permanent home for it. I’ve tested it a bit and it seems to work just fine, so you can get it at the link above. I will try to update it if and when Tim provides updates. I’m not listing Tim’s email here due to spam bots; if you want to contact him, his email address is listed in the about page of the DukasCopier.

Please note that even though I tested the application a bit, I take no responsibility whatsoever for it. Should it decide to engage in any kind of intercourse with your computer or otherwise misbehave, feel free to post a comment but keep in mind that DukasCopier is offered on an as-is basis, with no express or implied warranty of any kind.

You will need the .NET Framework 4.0 to run the application.

The complicated way

Over the web, the Dukascopy data is available for download in files that span only 1 hour, so it follows that some tools are necessary to download and parse it if we don’t want to install JForex. I’m a fan of the PHP simplicity, so I chose that to write the scripts. They’re not commercial quality code, but they work. Feel free to do whatever you want with the code, but don’t forget to give credit where it’s due.

You can download the archive here.

You will find 4 scripts inside:

  • A script for downloading the Dukascopy data, suggestively named “download_dukascopy_data.php”. As a courtesy for Dukascopy who is graciously providing free data, even though the script doesn’t download existing data, it still requests missing files, so, to avoid stressing their server, please set the dates in the $currencies array at the beginning of the script to the date of the last download; they’re using the standard linux seconds-since-1970 format, look up mktime to figure it out. If you want to easily convert from a regular date to such a unix timestamp, you can use Epoch Converter, a very easy to use online tool.
  • A script for processing the downloaded data, which assumes that it’s in the same directory with the previous script and that the data was downloaded there (process_dukascopy_data.php); this one needs some parameters, run it without any for a description or check out the next script.
  • A small shell script that will process all the downloaded data available in .bat form for windows and .sh form for linux.
  • As of 15.01.2011, you can also find a script that downloads candle data.

Windows download & convert to CSV how-to

Start by going to the windows PHP download section and fetching the latest binary version as a zip file.
Once you’ve done that, unpack it to c:\php\ and also unpack the scripts from dukascopy_php_scripts.zip in the same directory.
Rename c:\php\php.ini-development to c:\php\php.ini.
Edit c:\php\php.ini, search for
;extension=php_curl.dll
and remove the semicolon in front of the line and add an “ext/” in front of “php_curl.dll” so that it looks like this:
extension=ext/php_curl.dll
Save the file and exit.
If you run into a zip error and your PHP installation has an ext/php_zip.dll, also apply the method above for extension=ext/php_zip.dll.
Click start->run and type
cmd
then click ok (or alternatively type
cmd
then hit enter in the windows 7/vista “search programs and files” box in the start menu).
Type
cd \php
in the command window.
Type
php download_dukascopy_data.php
Have a coffee. Have another coffee. Go sleep. Go to work. Go to the gym. Go to a club. Wait some more. I’m not kidding, it takes ages. You can check the progress by watching the currency pair directories get filled. You can change the array at the beginning of the file to switch the order or to remove some pairs you don’t want. The number next to each pair is the timestamp at which to start downloading. If you get any strange errors, run the process again when it’s finished – it will only download any files that were missed in the first step due to network errors.

When the download is finished, assuming you wanted to get the EURUSD data up to 01.11.2009, you’d type
php process_dukascopy_data.php EURUSD 200702 200911 EURUSD.csv
and the output will be placed in EURUSD.csv.
Alternatively, you can type
process.bat
which will batch process all the currency data. It’s mostly safe to ignore the error spam at this step. Note: if you use process.bat or process.sh, you might have to update the ending dates in them to get the full data range!

This should be it, if everything went ok you should have your CSV files in the same c:\php folder.

Edit 07.02.2011: it appears that a bug in recent versions of PHP results in a CLI crash. If your processing suddenly stops, you are most likely suffering from this issue. Since it will likely be a while until the PHP team publishes a release with the bug fixed, I made an alternate version of the process PHP script that implements a workaround for this particular problem.

Warning: make sure you have enough space on your harddisk. The downloaded tick files have over 7.5 GB while the CSV files have close to 60 GB at the time of this writing.

Using the data

Edit 09.01.2011: I’ve made some major changes to the loaders and export scripts. For those who are familiar with the old ‘toolchain’, the following aspects have changed:

  • The loader is only required if you want to start more than an instance of MT4 from the same folder.
  • The patching is now done via “birt’s patch.mq4” which goes into your scripts folder. Run it on a chart and choose what you want it to patch.
  • It is now possible to use files over 2GB (up to 4GB) but only on Windows 7, Vista and Server 2008 (and above). This will not work on Windows XP or Server 2003 or any other earlier version of the OS.
  • Variable spread can be used in any MT4 build (225-229).
  • The old variable spread FXT format is now invalid. The new variable spread FXT format uses the volume (thanks Hyperdimension for the suggestion). The drawback is that until you restart the MT4 terminal, you can’t backtest regular FXT files after the variable spread patch is applied. Note: all the patches are applied by the patch script at runtime, in memory, so they’re not permanent.
  • You can pad the spread when using variable spread.
  • You can configure a commission in pips.
  • In the FXT script parameters, all the spread and commission values are in pips. This means that no matter if your broker is 4 or 5 digits, if you want a spread of 2 pips, you write 2.
  • The generated FXT files are automatically set read-only.

The rest of the article is going to be updated to reflect the current state of things.

Now, in order to use the CSV files, you need to perform some steps

  1. Convert the data to FXT & HST
  2. Copy the FXT & HST to the correct folders
  3. Use a script-patch in MT4 to allow loading your custom FXT file, then start backtesting

I’ll go through each step below:

Converting the data to an MT4 format

To convert the data to an FXT file (and the accompanying HST files) usable in Metatrader 4, you need a few scripts that you can download here.
Depending on what source data you have at this point, you need to use the scripts as follows:

  • If you created the CSV using JForex, you need to use JForex2FXT.
  • If you used the PHP scripts to create the CSV, you have to use Dukascopy2FXT.
  • If you have an Oanda CSV file, you have to use either Oanda2FXT or Oanda2FXT-alternate, whichever works for you. The reason there are two scripts for Oanda is that I’ve seen tick files from them with two different delimiters (space and comma).

Edit 15.01.2011: It has come to my attention that several companies may be making a profit by incorporating stuff I developed (available for free on this site) into their commercial products without even as much as asking permission. As such, to put an end to this, all the code you will find on this site is now distributed under the GNU General Public License v3 (GPLv3).

These scripts are based on GainData2fxt.mq4, an older script by an author that I couldn’t determine and on FXTHeader.mqh, written by stringo@codebase.mql4.com. The first one has suffered major modifications at my hand, while the second one was only modified here and there to adapt it to the updated FXT header structure.

You have to perform the following steps in order to convert the CSV data:

  • Copy the files from the zip archive to your MT4 installation. There’s a directory structure inside, make sure they land in the proper places.
  • Move the tick data file (the CSV file) to experts\files
  • Open a chart for the pair that you have data for (if you have EURUSD.csv you MUST open an EURUSD chart)
  • Select the timeframe that you wish to generate the FXT for (if you want to backtest on H1, then select H1 as the chart timeframe)
  • Double click the JForex2FXT script (or Dukascopy2FXT if you used the PHP method) in the navigation panel (it’s in the scripts section).
  • Configure the parameters in the window that pops up.
    For CsvFile you don’t need to write anything if the file is named just like the symbol and has a CSV extension (e.g. EURUSD.csv); otherwise, just type the file name there.
    Select “true” for CreateHst only if you want the script to create HST files. You do not need to perform this step more than once (leave it on “false” if you’re regenerating data for a different timeframe), because if this parameter is set to true, history will be generated for the whole span of the CSV file and for all timeframes, regardless of the start/end date you configure (note that the FXT file is still limited by those).
    By using the Spread parameter, you can configure the desired spread of the FXT file. If left at 0, it will use the current spread that your broker has. A special note here would be that many brokers are widening their spreads during the weekends, so pay close attention. If set to anything other than zero, it will be used as the spread. If you want a spread of 2 pips, enter 2.0, no matter if your broker has 4 or 5 digits. There’s also a small trick to change the spread without regenerating an FXT: open the existing FXT file with a hex editor; the spread is at offset 0xFC.
    The StartDate and EndDate fields control the span of the FXT file. MT4 has a problem with files larger than 2GB but the patch included in the archive fixes it, so it’s no longer mandatory to use these parameters. The format of the StartDate and EndDate fields is YYYY.MM.DD and if left blank the script will just use the earliest, respectively the latest date available in the CSV file.
    You can choose to use the real (variable) spread by enabling UseRealSpread. Note that the FXT files created with this parameter enabled will only work properly when the patch for real spread is applied. If using real spread, you can pad it by a given number of pips – if you want to pad it by 0.8 pips, just type 0.8 for SpreadPadding.
    If you want your resulted FXT to have commission, you can configure the PipsCommission value.
    As of 07.02.2011, upon Radulovic Attila’s suggestion, I added a Leverage parameter, set to 100 by default. Obviously, this changes the leverage of the resulting FXT file and the default value leads to a setting of 1:100. Radu has an MT4 programming blog and those interested will find there most of the backtesting info available on this page translated into Hungarian.
  • Click “Ok”. Once you do that, the data generation process will start and it will typically take 5 to 30 minutes, depending on the data range and volume, possibly even more if you’re using a slow machine. When the processing is finished, you will get an alert and some data will be printed in the Experts log.
  • Some people experienced miscellaneous issues. If your particular case is not listed here, feel free to drop a comment, I might be able to help. Also, take a look at the comments, your issue might have already been discussed.
    Among the common problems that the people encounter it’s worth mentioning the Windows 7 / Windows Vista users that run MT4 from their Program Files folder and that are unable to find the resulting files. The issue is caused by the fact that they have UAC enabled and these operating systems use folder virtualization. For Windows 7, the resulting files can be found in c:\ProgramData\ typically, while for Windows Vista they can be found in c:\Users\username\AppData\Local\VirtualStore\Program Files\. If they’re not there, just search for *.FXT, they must be somewhere. To get around this problem, either copy your MT4 folder in a location that’s not protected by UAC or simply disable UAC (type UAC in the start->search box thing and follow the on-screen process).
    Another issue experienced by some users is the lack of a MIN_LOT and LOT_STEP for the symbol in the resulted FXT file materialized in Order Send Error 131 when backtesting. This is caused by generating the FXT file with a MT4 client that wasn’t connected to the broker when the script was started. When generating an FXT file, your terminal should be connected to your broker.
    Last but not least, if your backtest stops immediately and you get an error “TestGenerator: internal error because the file not opened” in the backtesting journal, it means you forgot to apply the patch-script, but since your FXT is read-only, it was not overwritten. All the FXT scripts set the generated files read-only now, you will thank me for that at some point.

Copying the data to the correct location

After the script above has finished running, you will end up with a lot of files in your “experts\files” folder. At this point, exit the MT4 terminal then proceed to moving any .HST files from “experts\files” to “history\your_server_name”. Pay very close attention if you have multiple server directories in your “history” folder – you will have to move them into the one that’s correct for active account!
Note: unless you modify the CSV or get a new one, the HST files only need to be generated and moved once.
After moving the HST files, move the generated FXT file from “experts\files” to “tester\history”.

Using the data in a backtest

Since the recent MT4 clients no longer offer the ability to use custom FXT files, you need to run a special script that patches your MT4 client at runtime. It is included in the same archive linked above, but I’ll also link it here for the sake of convenience. It should work with builds 225-229, but it will probably work with previous builds as well and perhaps even with future builds.
So, to use the FXT files you created in a backtest, you have to install the scripts in the archive above in your MT4 installation, open any chart and run the “birt’s patch” script on it. By default, it will fix the 2GB limitation problem and it will also enable your MT4 to load FXT files. If you have FXT files created using real, variable spread you also need to enable the RealSpread parameter, but please note that once you did that, your backtests will ONLY work with variable spread FXT files and if you want to perform a backtest with “normal” spread you have to restart your MT4 terminal.
What the patch mainly does is disabling the MT4 default behavior to regenerate the backtest files every time you start a new test – so, if a file is already there, a new one will not be generated. By placing the FXT file you generated with the script in the tester\history folder, you ensure that it’s the file it is going to use for your backtest; of course, the selected backtest currency pair and timeframe must coincide with what you generated the FXT with.
Note that even though you can use files over 2GB, there is still a limit at 4GB. This can also be removed, but I see no need for it now since I modified all the FXT scripts to skip duplicate ticks which greatly reduces the size of the resulted files and consequentially the backtest duration. Just to be clear, to be considered duplicate, two ticks must match the following conditions: they must be consecutive, they must be within the same minute and finally they must have the same ask and the same bid price.

Special note: the 2GB patch will not work on Windows XP, Windows 2000 and Windows Server 2003 for MT4 builds prior to 405.

If you want to launch more than a single MT4 instance from the same folder (for concurrent backtesting with different parameters, for example), you can use one of my loaders, depending on which MT4 version you have. As a fun fact, Metaquotes went through the trouble of adding an in-memory CRC check on the terminal startup to prevent the creation of such loaders starting from build 228. I guess it wasn’t much help. I wonder why they did it. If you’re interested in the offsets, dig in the comments.

How to verify it worked?

That’s easy: if your test is running and the file in tester\history was not recreated, it usually means everything is ok. Naturally, it’ll skip the “Collecting M??” and “Using M??” steps.

GMT offset

This is a sensitive issue for many EAs. The Dukascopy data seems to be GMT-based all around the year, so the GMT offset that you need to use is 0. The FXT MQL scripts now have an external parameter that lets you specify the GMT offset you would like for the resulting data, both HST and FXT.

Troubleshooting

Note: The new loaders are only useful for starting multiple instances of MT from the same folder, they have no effect on being able to run a tick data backtest.

If your FXT files are being overwritten it means one of the following:

  1. You forgot to run the “birt’s patch” script. Note that it has to be run every time you want to use an FXT file you generated.
  2. DLL imports are not enabled (Tools->Options->Expert advisors).

If your FXT files are being recreated, check the following:

  1. You are backtesting on the same currency pair & timeframe as the one you created the FXT for.
  2. DLL imports are enabled.
  3. You ran the “birt’s patch” script and it reported some weird stuff in the experts log (one of the lines should say “FXT overwriting disabled.” among other things)

If your resulted FXT/HST files are very small in size, you are very likely using JForex to export and a locale that has a comma instead of a dot as the decimal separator. You can temporarily switch to the English locale (basically you have to go to Control Panel->Regional Settings and do it; use Google if you need more info) or you can try to start JForex in English, someone reported having had success with that.

If you can’t find any FXT/HST in your experts\files folder and the script reports successfully writing XXX bars/ticks, it’s probably caused by the fact that you’re using Vista or Windows 7 and you have UAC enabled. You should try looking for the files in C:\Users\[USERNAME]\AppData\Local\VirtualStore\Program Files\[TERMINAL]\experts\files\.

If your backtesting journal contains an error that says TestGenerator: internal error because the file not opened it means that your FXT file was correctly set read only and that you copied it to the correct location, but you did not run the birt’s patch script.

Gain Capital tick data

Gain Capital is the company behind forex.com. From what I hear, they’re a decent broker. They also offer some free tick data. If you’re feeling a bit masochistic and want to play with it, I recommend using a download manager to fetch it. Fair warning: the quality is pretty bad – not only is the data missing large chunks of time, but it’s also sporting misaligned periods (e.g. you can sometimes find data from the previous week in the file for the current week).
Still, before finding the awesome Dukascopy data, I used this for testing so I perfected some scripts for it, available here.
Inside you will find:

  • A script to process the data into a CSV. This script is heavily based on the original by carloss from the indo-investasi forum.
  • A script to somewhat filter & sort the resulted CSV.

Since these are totally obsolete to me, I’m not going to provide more details and you’re going to have to figure out how they work. Shouldn’t be too hard, though.

Oanda tick data

If you’re one of the lucky people who can get the Oanda tick data (it’s only available to people who have an account there funded with over 1k USD), get it in CSV format and use the Oanda2FXT MQL script provided in the scripts archive. It works just like the Dukascopy2FXT script described above.

The Oanda format seems to be varied, probably because it can be selected when requesting the data or something like that. I explained how to work around this problem in a comment on page 2, but given the large amount of comments on this article I don’t expect people to actually find it, so I made an alternate Oanda script (also included in the archive) that handles tick data files with values separated by a comma.

Variable spread backtesting

If you want your backtest to be even more accurate, you also have the option to use the real spread from the tick data. All you have to do is:

1. Make sure you’re using the latest FXT scripts.

2. When running the script, set UseRealSpread to true.

3. When running “birt’s patch”, enable the RealSpread parameter.

Paolo of siolifx.com ran the data integrity checker script from mt4i.com on Oanda and Dukascopy data and as it seems, although the Oanda data spans a larger time interval, it also has a lower quality. With his permission, I uploaded his Dukascopy EURUSD results and Oanda EURUSD results so everyone can take a look.

Ninjatrader export

A kind soul nicknamed xTrader1 has modified the process php script and made it export data that can be used in Ninjatrader. Quoting from his comment that is also available below if you’re into digging:

I tweaked your PHP script “process_dukascopy_data.php” in such a way, that it creates an original CSV file, but in addition 2 files Bid and Ask prices in ready to import NinjaTrader format.

He’s also been decent enough to send me the script and give me permission to host it here. Just as a disclaimer, I haven’t actually tested it so if it kills your dog or eats your babies I can’t be held responsible. Without further ado, I give link you the ninjatrader parse script. For some reason that I can’t explain, I got quite a kick out of naming the archive “dukascopy ninja script”.

Candle data

Starting from 11.02.2011, a pair of scripts that will allow you to download and process the Dukascopy candle data is available in the PHP scripts archive. Both of them work just like their tick data counterparts so no additional instructions are needed. They will download and process the M1 datal; if you want to change that, feel free to play with the source code. Since my time is very limited, they were only tested very briefly. If you run into any problems, please drop a comment or just use the contact form.

Short FAQ

Q: Why would I need this instead of tick data?
A: Because it’s available starting from 2003 while tick data is only available starting from 2007.

Q: Why would I use this instead of the Metaquotes data which starts from 1999?
A: Because the Metaquotes data has a lot of large gaps.

Q: Is there any way to import it in Metatrader and use it for backtesting?
A: Not really. Due to the volume data (expressed in traded currency), it’s not possible to make an accurate guess in regards to the number of ticks that occurred, which is what Metatrader needs. The solution would be to import the number of ticks from the Metaquotes history and randomly extrapolate where there are gaps, but currently there is no automated tool to do this.

Download links

For easier reference, here you go:
Dukascopy data download / parse scripts
MT4 terminal patch and FXT creation scripts
Multiple MT4 instance loaders
Gain Capital data tools
Tim’s DukasCopier
.NET Framework 4.0 (required for Tim’s DukasCopier)
Visual C 2010 runtime (x86) (required for removing the 2GB limit on Windows XP/2003 Server with MT4 builds 405+)
Visual C 2010 runtime (x64) (required for removing the 2GB limit on Windows XP x64/2003 Server x64 with MT4 builds 405+)

Update history

Since there are frequent updates to the scripts and I didn’t think to add some kind of versioning system, I decided to keep a Tick Data changelog, just to let you decide whether you need to update or not.