How to Download Dukascopy Tick Data and Purse it with Birt's PHP Scripts [Outdated]

The available data in Dukascopy is raw in the form of files spanning only one hour, so it's obvious that tools will be needed to download and parse it. Before other methods to get the data were available, a series of scripts were useful to download Dukascopy free tick data, and they are still valid till now. PHP scripts are so simple, with non-commercial quality code, but working well.

These PHP scripts are available in the tick data downloads page.

  • There are 4 scripts
  • A script to download the Dukascopy data called "download_dukascopy_data.php". If you have files already downloaded on the hard disk, the script does not attempt to them, while it just requests the files not existing, to make this work successfully, dates in the $currencies array at the beginning of the script should be set to the date of the last download; as the standard Unix timestamps are used by Dukascopy (epoch date, which equals the number of seconds since 01.01.1970). To convert from a regular date to such a Unix timestamp with ease, Epoch Converter could help, a very easy to use online tool.
  • A script to process the downloaded data, assuming that it is present in the same directory as the last script where the data was downloaded too (process_dukascopy_data.php); this script needs some parameters, it doesn't need to be described or you can revise the next script.
  • A small shell script to process all the downloaded data with .bat extension for windows and .sh extension for Linux.

How to download and convert to CSV in windows

First you need to go to windows PHP download part and get the latest binary version zip file, then decompress it to c:\php\, then decompress other scripts downloaded from same directory too.

Rename c:\php\php.ini-development to c:\php\php.ini. If there is no file named php.ini-development in the folder, use php.ini-dist or any other php.ini-something file there.

  • Edit c:\php\php.ini;
  • Search for: ;extension=php_curl.dll
  • Remove the semicolon in front of the line
  • Add an "ext/" in front of "php_curl.dll"
  • Then, it should look like: extension=ext/php_curl.dll
  • Save the file and quit.

If a zip error occurred and an ext/php_zip.dll is in the PHP installation, repeat the last steps too for extension=ext/php_zip.dll.

  • Go to the 7-Zip download page, download the command line version, unpack it and put 7za.exe in the same directory (c:\php\).
  • Click "start->run".
  • Type: cmd
  • Click "ok" (in windows 7 / vista, type cmd then hit enter in "search programs and files" box of start menu).
  • In the command window type: cd \php
  • Type: php download_dukascopy_data.php

Relax, then wait, don't rush at all, this will take ages. The progress can be checked by exploring the currency pair directories till get filled. If any abnormal error occurs, repeat the process again after it's finished, it will just download missed files in the last run due to connection errors.

If just some of the available currency pairs are needed, the array present at the beginning of "download_dukascopy_data.php" file can be edited. The order currency pair download can be switched, or even a complete removal of the unwanted pairs is possible. The time to start to download of each pair is present next to it in the form of a Unix timestamp number, it's set to the earliest available date by default, it can be postponed to a later date by editing this number by the help of Epoch Converter.

  • After the download has completed, if the EURUSD data up to 01.01.2012 for instance are needed:
  • Type: php process_dukascopy_data.php EURUSD 200702 201201 EURUSD.csv
  • The output will be found in EURUSD.csv
  • Alternatively, you can type: process.bat

The later will batch process all the currency data. The error spam at this step can be safely ignored. Note: if process.bat or process.sh is involved, the ending dates in them may need to be updated first to get the full data range.

Now assuming that everything went fine, the CSV files should be now in the same c:\php folder and it's ok to proceed with preparing the tick data for MetaTrader 4.

Warning: Adequate disk space must be available. As by 2012, the downloaded tick files are over 20 GB in size, and by adding up the size of the resulted CSV files, the total size could exceed 100 GB.

Latest Tick Data Suite Posts
Current MetaTrader Platform Will Stop Working After May 1st, 2023
Current MetaTrader Platform Will Stop... The traders using a version of MT...
MetaTrader 4 and 5 Applications Are Back in the Apple AppStore
MetaTrader and Applications Are Back... MetaTrader and MetaTrader Apps were reinstated on...
MT4 and MT5 have been removed from Apple iOS AppStore
MT and MT have been... Apple removes the widely used and most...
Renko Bar Backtesting with Tick Data Suite and Other Great Features
Renko Bar Backtesting with Tick... It is now possible to run backtests...
Tick Data Suite Features and Details
Tick Data Suite Features and... The Tick Data Suite is a Unique...
Free Tick Data Download
Free Tick Data Download... A lot of tick data sources are...
Tick Data Suite Guide [OUTDATED]
Tick Data Suite Guide OUTDATED... On arriving to this guide it's assumed...
How to Download Dukascopy Tick Data with JForex Platform
How to Download Dukascopy Tick... A Quick Guide on How to Download...
Download Birt's Free Tick Data Tools and Scripts [Outdated]
Download Birt's Free Tick Data... Download Birt's Free Tool and Script Files...
Problems with Conversion to FXT and Tick Data Usage in Tick Data Suite [Outdated]
Problems with Conversion to FXT... Problems and Issues with Strategy Backtesting in...
Free Birt's Batch Script MT4 FXT Files 2GB Limit Removal [Outdated]
Free Birt's Batch Script MT... Birt's Patch Script Removes the GB the...
Enabling and Verifying the Use of Prepared Tick Data by MT4 for Backtesting [OUTDATED]
Enabling and Verifying the Use... As the Latest Metatrader Client Builds are...
How to Prepare Tick Data FXT Files for MT4 Backtesting with CSV2FXT [OUTDATED]
How to Prepare Tick Data... Native CSV File Containing Tick Data are...
Tick Data Suite VS Free Birt's Batch [OUTDATED]
Tick Data Suite VS Free... In fact the Tick Data Suite is...
Published On Wed, 16 Oct 2013

Talk about Tick Data Suite

Information, charts or examples contained in this blog post are for illustration and educational purposes only. It should not be considered as an advice or endorsement to purchase or sell any security or financial instrument. We do not and cannot give any kind of financial advice. No employee or persons associated with us are registered or authorized to give financial advice. We do not trade on anyone's behalf, and we do not recommend any broker. On certain occasions, we have a material link to the product or service mentioned in the article. This may be in the form of compensation or remuneration.

Share