The tick data section of eareview.net is a detailed guide that will lead you through the whole process of tick data backtesting, starting from where to acquire free historical Forex tick data, how to download it and how to use it in backtesting Metatrader 4 expert advisors to obtain a 99% modeling quality. If you’re not sure what backtesting is, it’s probably a good idea to purchase the Metatrader Backtesting and Optimization Course, which is geared toward people that are new to Forex and Metatrader 4 backtesting.
This page is divided into several sections:
- Scope
- Tick data guides
- The Metatrader Backtesting and Optimization Course
- The Walk Forward Analyzer
- History
Scope
In general, backtesting using the data from the MT4 history center might be good enough for EAs that are not scalping or pip hunting. However, if you’re dealing with such an EA or any kind of EA that closes trades within 1-15 pips, 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 using the data for the smallest timeframe available. This is most likely not important to an expert advisor that uses stoploss and takeprofit targets of over 100 pips, but in the case of robots that attempt to scalp a few pips here and there, your backtest could be completely misleading.
So, it is very important to try testing using data having a quality that is as high as possible which is why I put together some resources, all of which I use in my backtesting when needed.
Tick data guides
- How to download free tick data – details the download process using several free tick data sources: Dukascopy, Oanda, Pepperstone, Integral, MB Trading and Gain Capital.
- Downloading Dukascopy tick data with JForex – a guide that provides an in-depth description of the download procedure using the Dukascopy JForex client.
- Downloading and parsing Dukascopy tick data with Birt’s PHP scripts – a how-to which goes into a lot of detail on the subject using the PHP scripts I wrote for downloading and processing tick data from Dukascopy.
- How to prepare your tick data for Metatrader 4 – guide to converting the tick data to a format compatible with Metatrader 4 (from CSV to FXT).
- How to backtest using tick data with Metatrader 4 – a review of the options available for using tick data with the Metatrader 4 platform.
- How to backtest using tick data – the Tick Data Suite guide – a guide that describes the usage of the Tick Data Suite, the preferred tick data activation method that has a lot of features that its alternative lacks. It is much easier to use and fully supported. See the Tick Data Suite feature matrix for a detailed comparison.
- How to backtest using tick data – the free Birt’s patch script guide – a how-to that delves into the usage and limitations of the free method that enables tick data backtesting.
- FAQ & Troubleshooting
- Downloads
The Metatrader Backtesting and Optimization Course
Using tick data 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, it might be an idea to head to the Metatrader Backtesting and Optimization Course (formerly named 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. However, their scripts are inspired from my scripts from the end of 2009, meaning that they are somewhat outdated now.
I’ll be honest with you: at first, when I saw the old name of the product (Guide to Getting Rich with Forex Robots) 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. As a bonus, there’s a section dedicated to becoming a signal provider, but I’m not sure that’s the best way to go. 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. They used to have a very good support system (I’ve had to use it myself) but nowadays I’ve heard several people complain about large delays in replying. Other than the support seemingly lacking as of late, 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”; these aside, it’s well worth the $87.
The main differences between their tools suite and what you can find here are:
- If you choose to use the Birt’s patch script or Tick Data Suite, you do not need a loader unless you want to load multiple MT4 instances from the same folder.
- In most cases, the 2GB FXT limit no longer applies.*
* The 2GB limit still applies to MT4 builds 402 or lower when using the Birt’s patch script and an older OS (e.g. Windows XP, Windows Server 2003).
Long story short, the Metatrader Backtesting and Optimization Course contains some info that complements that which you can find in my pages.
The Walk Forward Analyzer
Not directly related to tick data but with built-in support for it, the Walk Forward Analyzer is an excellent tool that lets you optimize your Metatrader 4 expert advisors in steps, in a technique called Walk Forward Analysis which is also described in the Metatrader Backtesting and Optimization Course. Simply put, you optimize your EA for say 3 months, then you test it for the next 1 month to see if the best parameters resulting from the optimization work fine on out-of-sample data, then you optimize it further on the next 3 months and so forth. This tool lets you automate the whole process and does all the runs for you, providing an exhaustive set of configuration parameters and a neat optimization report at the end. Priced at $29.95, it’s a veritable steal; the Walk Forward Analyzer is definitely a must-have for anyone doing serious EA development. But don’t take my word for it, visit the website and download the 14 day trial version. To top it all, Andrew – the programmer – is also very prompt with tech support as well as feature requests that make sense.
History
Since there are frequent updates to the tick data tools, I decided to keep a Tick data changelog that lists all the changes that the scripts have gone through.
Also, for those interested, the old tick data page is still available but a lot of the information there is now obsolete.
-
-
#1794 written by Mat January 15, 2012 (1 year ago)
By the way, now I am processing the euraud data with php to create the csv file.
Sometimes I get some warning about. Issuing data file in some folder…. It is not a Saturday or a Sunday …. So are those error in the tick data? Is this normal? Or should I use the php script to grab them course is never failing? -
#1797 written by trader January 16, 2012 (1 year ago)
-
#1798 written by birt January 16, 2012 (1 year ago)
The patch script might work with optimization with builds 402 or below. Mind you, there’s no guarantee it will and you might run into other problems such as the EAs not working with those builds.
This month I will release a commercial tool that will allow optimization with tick data with all builds.
-
#1799 written by Alex January 22, 2012 (1 year ago)
-
#1800 written by Alex January 22, 2012 (1 year ago)
-
#1801 written by birt January 22, 2012 (1 year ago)
The current beta already works with the Walk Forward Analyzer. The existing files don’t get overwritten, but you have to make sure that your FXTs have the whole range required by the WFA.
As for starting multiple instances, I don’t know. If the WFA supports that, then yes, definitely. Running the loader repeatedly allows running multiple instances from the same folder.
-
-
-
-
#1802 written by trader January 16, 2012 (1 year ago)
-
#1804 written by Tyler January 16, 2012 (1 year ago)
Dukascopier is still reporting nothing but 404 errors trying to find data on Dukascopy’s website. Exmaple:
D:\Forex\DukasCopier\EURUSD\201201\21h_ticks.bin – The remote server returned an error: (404) Not Found.
D:\Forex\DukasCopier\EURUSD\201201\22h_ticks.bin – The remote server returned an error: (404) Not Found.Is anyone else having any luck?
-
#1805 written by pipsaw January 16, 2012 (1 year ago)
Sorry, forgot to hit the reply button earlier –
Tyler I dont think the issue is with Dukascopier, no luck on php or Dukascopy website either. Interestingly, the data is gone from the start of 2008. This is what I have from php script (i can’t get anything after this timestamp) –
Info: Downloading EURUSD starting with
WARNING: missing file http://www.dukascopy.com/datafeed/EURUSD/2008/00/01/00h_ti
cks.bin (1199145600)
-
-
#1806 written by pipsaw January 16, 2012 (1 year ago)
Tyler I dont think the issue is with Dukascopier, no luck on php or Dukascopy website. Interestingly, the data is gone from the start of 2008. This is what I have from php script (i can’t get anything after this timestamp) –
Info: Downloading EURUSD starting with
WARNING: missing file http://www.dukascopy.com/datafeed/EURUSD/2008/00/01/00h_ti
cks.bin (1199145600)-
#1807 written by Tyler January 16, 2012 (1 year ago)
-
#1808 written by birt January 16, 2012 (1 year ago)
Yeah, it’s been the weekend. They’re hopefully back to the office and already working on fixing the issue. As pipsaw mentioned, only data for the past 3 years is missing and the history downloader on the Dukascopy website is not working either, which probably means the whole thing is just a fluke, nothing permanent. Have some patience, I’m pretty sure it’ll come back up.
-
-
-
#1810 written by Mike January 16, 2012 (1 year ago)
I just started the php process and after not too long I started getting a lot of missing file messages. I tried accessing the .bin file directory from a different network connection to see if maybe they blocked my IP or something along those lines, but I’m getting 404 errors from there too, even when I try accessing one of the files I was able to successfully download when I first started the process. It looks like they may have removed the datafeed. Can anyone confirm? Is this data not available in a zipped format online somewhere or would that be some sort of violation???
-
#1812 written by Szilard January 17, 2012 (1 year ago)
Hi there. Is that normal that if “use real spread (11)” and “use fix spread (20)” are appied to a M5 backtest after each other, then the results vary dramatically?
I ran an EA on USDCAD 2011.01. fix 0.1 lots 1000EUR starting equity.
The real spread version resulted +123 EUR in one month
The 2 pip spread version resulted – 155 EUR in the very same month.
Strange thing is that even trade openings differ in the two versions. The EA uses price levels as trade open condition, not indicators.Additionally strange thing is that in the real spread version no volumes indicator can be calculated. Volumes is 0 continously.
The condition “if (iVolume(NULL,0,0) ==1 ) ” never gives true result.What could cause so big difference?
-
#1816 written by Meena January 18, 2012 (1 year ago)
Have an account with Oanda so I have access to their tick data. Run Birt’s patch set properly. I have a file for EURUSD I have it named: eurusd 11-1-10 to 11-1-11. It is placed in Experts/file. I have followed the instructions but I get the message “cannot open input file”. mt4 build 409. Have tried both Oanda files… any idea what’s going on? the fxt file is in include folder..
thanks…-
#1817 written by birt January 18, 2012 (1 year ago)
If it says “cannot open input file”, it means one of the following:
- Your file was not named as the pair name (EURUSD.csv) and you did not type the file name in the input parameter.
- You forgot to type the file extension (.csv, .txt or whatever it is) when typing the file name in the input parameter. Please note that Windows Explorer might be configured to hide extensions for known file types which might be confusing you into thinking it has no extension.
- If the above do not apply, you did not copy the file to the correct location
-
-
#1818 written by Alex January 18, 2012 (1 year ago)
-
#1819 written by Simon D January 18, 2012 (1 year ago)
-
#1820 written by Alex January 18, 2012 (1 year ago)
-
#1821 written by Simon D January 18, 2012 (1 year ago)
use notepad or wordpad or any other text editor. You need to comment out like this:
//”EURSEK” => 1175270400, // starting from 2007.03.30 16:00
“EURUSD” => 1175270400, // starting from 2007.03.30 16:00
//”GBPCHF” => 1175270400, // starting from 2007.03.30 16:00every currency apart from the one you want two slashes in front
-
-
-
-
#1823 written by Meena January 18, 2012 (1 year ago)
-
#1825 written by Meena January 18, 2012 (1 year ago)
Renaming the file does not work.
In the past I have run Dukascopy successfully but it was in 2010.
I have an old setup for FXDD from 2010. I’m going to try to install it without updating it and see if that will work with Oanda data.
Maybe it is mt4 build 409 that is the problem.
Trying to run this on Windows 7.
I am sure I am doing everything as instructed.
I can also try to run this on Vista on another computer.
Thank for your patience..-
#1826 written by birt January 18, 2012 (1 year ago)
-
-
#1827 written by Meena January 18, 2012 (1 year ago)
-
#1829 written by Harald January 18, 2012 (1 year ago)
If this all not helps, go to http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx and get the Process Monitor. It can (besides other things) log any file access from an application. Filter for terminal.exe and check the log.
-
#1830 written by Meena January 18, 2012 (1 year ago)
yes it is in experts/file.
not experts/filesI am trying to Google for discussion about similar problems…
If I try to open the CSV file with notebook it says stopped working, would that just be because is it a large file 471020KB and it will take some time for it to open in notebook? Is it too big for notebook to open?
The file in question is Oanda separated by commas.-
#1831 written by Harald January 18, 2012 (1 year ago)
-
-
#1834 written by Harald January 18, 2012 (1 year ago)
-
#1835 written by Meena January 18, 2012 (1 year ago)
-
#1836 written by Jason January 18, 2012 (1 year ago)
Birt
I seem to be having problems when running optimisation after running the Brits Patch. I just wanted to check the following in the Experts journal is correct:
2012.01.18 22:32:18 birt’s patch EURUSD,M15: removed
2012.01.18 22:32:18 birt’s patch EURUSD,M15: uninit reason 0
2012.01.18 22:32:18 birt’s patch EURUSD,M15: Process patched for variable spread at 0×557016. Volume check removed at 0x55734E.
2012.01.18 22:32:17 birt’s patch EURUSD,M15: Patched: fseek 0×557244, fopen 0×557154, fclose 0x55710E, fclose 0x555BD5, fclose 0x5563EE, fread 0x55729A, filelength 0x55718D. 2gb limit removal patch was installed at 0×4270000.
2012.01.18 22:32:17 birt’s patch EURUSD,M15: FXT overwriting disabled. Addresses patched: 0×556122, 0x55623B, 0×556343.
2012.01.18 22:32:16 birt’s patch EURUSD,M15: MT4 build 409 detected.
2012.01.18 22:32:16 birt’s patch EURUSD,M15 inputs: NoFXTOverwrite=true; Remove2GBLimit=true; WARNING2=”Using variable spread with a non-variable spread FXT does NOT work.”; RealSpread=true;
2012.01.18 22:32:06 birt’s patch EURUSD,M15: loaded successfully..Jason
-
#1837 written by birt January 19, 2012 (1 year ago)
Optimization does not work with that script with build 405+ and it has problems even with previous builds.
I am working on a loader that also supports optimization, but it’s going to be launched as a commercial product. It’s already been in beta testing for a while. Keep a close eye on the site during the following couple of weeks if you are interested.
-
-
#1838 written by Meena January 19, 2012 (1 year ago)
I tried a couple of things which seem to have fixed the problem of “cannot open the file” in windows 7 for Oanda build 409. In permission I disabled “WMPNetworkSvc”. Named the file simply EURUSD, although I had tried to run the script before with that name with no success. Anyway the file is converting now. Thank you…
-
#1839 written by Meena January 19, 2012 (1 year ago)
-
#1840 written by birt January 19, 2012 (1 year ago)
That can be caused by a number of things:
- You’re running a recent EA on builds 402 or earlier
- You have run another backtest prior to running the Birt’s patch script
- You’re trying to run an optimization.
Judging by what you wrote above, you are running version 228 which will crash with pretty much every other EA available nowadays. I suggest trying to attach the EA to a chart before trying to backtest it. If your terminal build is 402 or below, consider trying with build 409.
Other options to try: restart the terminal, run the birt’s patch script as soon as it starts, attach the MACD EA to a chart and if that works, backtest it.
As for your previous problem with the CSV file, it was most likely caused by the fact that you named it EURUSD.CSV.CSV but windows explorer was hiding the file extension. Google “hide extension for known file types” if you wish to disable that.
-
-
#1841 written by Alex January 19, 2012 (1 year ago)
I reloaded tick data with php, again followed all the instructions so everything is in its place, run the patch script; but when I try MACD_Sample or any other (it skips the “Collecting M??” and “Using M??” steps) I get 25% modeling quality. I decided to check the data with the “MT4i Data Integriry Checker”, it says that data is OK. How can I finally get 99% ? Help.
-
#1842 written by birt January 19, 2012 (1 year ago)
I would venture a guess that you are using the “control points model” instead of “every tick”.
If that’s not it, check that you have DLL calls enabled (the FXT should be impossible to overwrite because it should be set as read-only if you had that enabled when creating it) and if you do, please post the lines related to the birt’s patch script that appear in your experts log after running it.
-
#1843 written by Alex January 21, 2012 (1 year ago)
I use “every tick”.
Here is the log:
“”
13:16:33 birt’s patch GBPUSD,H1: loaded successfully
13:16:43 birt’s patch GBPUSD,H1 inputs: NoFXTOverwrite=true; Remove2GBLimit=true; WARNING2=”Using variable spread with a non-variable spread FXT does NOT work.”; RealSpread=false;
13:16:43 birt’s patch GBPUSD,H1: MT4 build 409 detected.
13:16:43 birt’s patch GBPUSD,H1: FXT overwriting disabled. Addresses patched: 0x5560E2, 0x5561FB, 0×556303.
13:16:45 birt’s patch GBPUSD,H1: Patched: fseek 0×557204, fopen 0×557114, fclose 0x5570CE, fclose 0x555B95, fclose 0x5563AE, fread 0x55725A, filelength 0x55714D. 2gb limit removal patch was installed at 0×3840000.
13:16:45 birt’s patch GBPUSD,H1: uninit reason 0
13:16:45 birt’s patch GBPUSD,H1: removed
“”-
#1844 written by birt January 22, 2012 (1 year ago)
-
#1846 written by birt January 23, 2012 (1 year ago)
I’m not sure what could be wrong but getting a 25% modeling quality on M1 means one of the following:
- you are using control points
- you are using regular backtesting (interpolated ticks)This means the FXT you generated was not used, either because it wasn’t copied to the correct location or because it was overwritten when you started the backtest. Judging by the log you posted you seem to have correctly run the script (I’m assuming prior to the backtest), so I would check that the tick data FXT is in tester/history. Copy it once more if you have to because if you got 25% once, you must have a 25% percent FXT in there. Another thing to make sure is that you’re copying it to the correct MT4 folder if you have multiple installations on your computer.
-
#1847 written by Alex January 24, 2012 (1 year ago)
-
-
-
-
-
#1849 written by Jason January 19, 2012 (1 year ago)
-
#1850 written by birt January 19, 2012 (1 year ago)
The script that is available for download for about 2 months now works with build 409 with a few limitations (it must be started prior to any other backtest and optimization does not work).
As for beta testing, one of the requirements is prior experience and a certain degree of familiarity with tick data backtesting. If you feel you meet this criteria, please get in touch with me using the contact form.
-
-
#1851 written by John Bennett January 20, 2012 (1 year ago)
-
#1853 written by Tyler January 21, 2012 (1 year ago)
-
#1855 written by Alex January 22, 2012 (1 year ago)
-
#1858 written by Jak January 21, 2012 (1 year ago)
-
#1860 written by Jason January 22, 2012 (1 year ago)
-
#1862 written by Mike C. January 23, 2012 (1 year ago)
-
#1863 written by birt January 23, 2012 (1 year ago)
Personally, I use hiew because it can also disassemble stuff but I wouldn’t recommend that one to you because it’d feel clumsy. Just get any windows hex editor, e.g. winhex.
You can edit the leverage at offset 0×164 I think (or somewhere close to that, it should be 0×64 if you set it to 1:100, just look for that and change it).
-
#1864 written by Mike January 26, 2012 (1 year ago)
Awesome, I found the field and the corresponding value. I had actually set mine to 200, so it was C8. I’d like to change it to 300, but 300 in hex uses three digits…should it overlap into the field on the left or the right of C8? If you’re not sure, no big deal, just trying to see if I can save time from generating a new FXT file with different leverage if I don’t have to. Thank you!
Oh by the way, found an amazing hex editor called Neo Hex Editor, looks up the whole 3gb file in an instant and is very browsing friendly
-
-
-
#1866 written by Jason January 23, 2012 (1 year ago)
-
#1867 written by Alex January 23, 2012 (1 year ago)
Well to convert the data via the JForex2FXT script you need to be connected. But I guess a demo account should be sufficient. The 209 build I found was customized for Sunbird, but I just copied my Alpari setting into it.. Later on you don’t need to be connected anymore. Do you know any security issues with this build?
-
-
#1868 written by SvenGali January 23, 2012 (1 year ago)
Hi Birt,
getting data from Dukascopy works really fine – great blog / great work – thx! I have an issue with JForex2FXT (FXPrimus Metatrader Build 409). The EUR.USD csv-file looks good (complete – checked with ultraedit), but when I apply the script to the 1M-chart, it only reads data until mid of 2010 (exactly 2010.06.09 19:36), then starts shortly with 2012 (but only weird data, i.e. 2012.12.31…) and then stops. If I load the according hst-files, I can see that most of 2010 and 2011 is missing and I think it’ll be the same with the fxt-file. I already tried to use a smaller time-frame but that doesn’t solve the problem. The file-size of the csv-file is 5.8 GB. Could you tell me more ’bout the possible cause? Thx in advance. SvenGali
-
#1869 written by birt January 23, 2012 (1 year ago)
There’s an error in your CSV file. I’ve already written a script that is able to handle such cases over a week ago, but it changes things dramatically and I have to rewrite that part of the guide, plus the downloading part which I’ve already rewritten but not published yet. In other words, the script is ready but it is waiting for me to have the time to rewrite the guide, which might happen this week or perhaps the next.
In the meantime, I suggest reading the last couple of comment pages for solutions as you’re not the only one that ran into this problem.
-
-
#1870 written by Jason January 24, 2012 (1 year ago)
Alex / Birt
I’ve managed to find a Sunbird build 229 and got it to connect to the broker using the login from a version 409. Converted the CSV and transfered the files but still no luck getting the MT4 to run a Optimisation.
I’m converting the FXT using a 2.0 pip spread.
Any suggestions?
I’m running the MT4 on Windows 7
Jason
-
#1873 written by Jason January 24, 2012 (1 year ago)
Birt
I think my issue is with the tick data once converted…something is going wrong. I’ve tried both JForex & Dukas Copier CSV files and converted with the corresponding scripts to product both FXT & HST files then copied to the directories. I then run the Birts script and start the Optimisation, but I’m not getting any Opimisation results – i’ve tried several EA’s including the sample MACD sample. When i convert the CSV files shoulds i input both the Spread which I’ve been setting to 2.0 and also the Real Spread? or just select one or the other? I also found the that the newer MQL script makes the 229 build crash, so i’ve used an older Script I found in a post from last year…
I’m just converting 1 year of tick data at a time, and tried leaving the Use date box ticked and unticked..
Jason
-
#1874 written by Jason January 25, 2012 (1 year ago)
Birt
I forgot to add that i’m converting 1 year of data and I can get the MT4 to run only on 1 month of data, and it goves me optimisation results, any longer and it the Journal is saying : 2012.01.25 01:03:25 There were 4 passes done during optimization, 4 results have been discarded as insignificant…..
Jason
-
#1876 written by Jason January 25, 2012 (1 year ago)
-
#1877 written by birt January 25, 2012 (1 year ago)
Optimization is not supported with the Birt’s patch script. If you can get it to run, good for you; otherwise, if you need to run optimizations you can just wait for the Tick Data Suite which is now in beta testing and which should be released within the following couple of weeks.
Basically, the script was never supposed to work with optimization although it seems to occasionally do so with builds older than 402 but with severe limitations (such as only selected periods). Please read the previous comment pages if you need any more information.
-
-
#1878 written by jore January 25, 2012 (1 year ago)
Hi birt,
I got the following messages when create fxt files with Dukascopy2Fxt.
I create csv-files with dukasCopier.2012.01.25 10:01:25 Dukascopy2FXT EURUSD,H1: Starting to process EURUSD 2029.
2012.01.25 10:01:22 Dukascopy2FXT EURUSD,H1: Starting to process EURUSD 2027.
2012.01.25 10:01:21 Dukascopy2FXT EURUSD,H1: Starting to process EURUSD 2012.
2012.01.25 09:56:48 Dukascopy2FXT EURUSD,H1: Starting to process EURUSD 2009.
2012.01.25 09:34:15 Dukascopy2FXT EURUSD,H1: Starting to process EURUSD 2008.But no such years are in the csv-file, I checked it with uedit.
The fxt file is relativly small (1,454,540kB), when I try it, MT4 crashes.I use MT4.209 Dukascopy2fxt from 11.03.2011.
In the log of DukasCopier there are some “Zero length file skipped.” messages, but I think that is OK.
And it finished with:
EURUSD\20120\23\23h_ticks.bin – Der Remoteserver hat einen Fehler zurückgegeben: (404) Nicht gefunden.Weeks ago all things work well.
Any ideas?Thanks
-
#1880 written by Xman January 27, 2012 (1 year ago)
I had the same problem with incorrect years like 2029, 2031 showing up in the FXT only.
Here’s a workaround :
In my case, the issue seems to happen only when my csv files were over 4gb. So I used the “gsplit” freeware tool ( http://www.gdgsoft.com/gsplit/ ) to split my CSV into 2 files.My EURUSD 2007-2011 CSV filesize was 6.8gb and with gsplit configured to split the csv file after 67million linefeeds characters, it did the job nicely. It resulted in 2 files, first file had data from 2007/04 to 2008/11, second file had 2008/12 – 20011/06. I took a peak at the first few lines of the csv by using BeyondCompare and clicking stop before it loads the entire file and max out your ram. If there is a better text editor to stream view these massive files, I would love to know.
Renaming the second file to EURUSD.CSV and re-running Dukascopy2fxt did the trick. No more invalid 2029,2031 years in the log. The caveat is you can only load one of the csv files into the FXT, I loaded the second file (2008/11 to 2011/06), the first file can be loaded separately (replacing current FXT) if needed later.
Similar process worked on a Jforex file 2007-2012, split it so last file is under 4gb and run the converter. Its a workaround until MT4 or coverter can support over 4gb csv files.
-
#1881 written by Jason January 25, 2012 (1 year ago)
-
#1883 written by nicco January 25, 2012 (1 year ago)
-
#1884 written by Harald January 25, 2012 (1 year ago)
-
-
#1886 written by Delbru January 25, 2012 (1 year ago)
Hi Birt,
For you info I want to back test my EA on tick data from dukascopy using the ‘JForex2FXT’. Data range is 09/01/2011 to 12/30/2011. I followed all the steps as you mentioned.
When I ran the ‘birt’s patch’ from scripts I got the following error.2GB limit removal not activated.
If you’re using Windows XP, consider getting a copy of the Visual C 2010 runtime, available at http://www.microsoft.com/download/en/details.aspx?id=5555 (x86) and http://www.microsoft.com/download/en/details.aspx?id=14632 (x64).
Could not find the _fseeki64() function in your msvcrt.dll or msvcr100.dll!
Also in the Forex.com Metatrader strategy tester I get the error for 5m and any other time frame.
TestGenerator: no history data ‘XAUUSDFXF5′-
#1887 written by birt January 25, 2012 (1 year ago)
If you only wish to backtest such a short time period, you don’t even need to care about the 2GB limitation. The FXT files will be larger than 2GB only if they span several years.
As for fixing the 2GB problem, if you’re using MT4 build 405 or higher, all you have to do is what it tells you: download the MSVC10 runtime.
Finally, regarding the “no history data” message, that means that your history center does not have history for the XAUUSDFXF5 pair for the timeframe you selected. Try opening a chart with that pair and timeframe and keep pageup pressed for 30-60 seconds.
-
#1888 written by Delbru January 27, 2012 (1 year ago)
Hi Birt,
I Downloaded 3 months worth of XAUUSD Tick data from 09/01/2011 to 12/30/2011.
I placed the XAUUSDFXF in Forex.com MT4 ‘experts/files’ folder. I am not sure how to view chart of this particular dataset. Whenever I drag and drop the XAUUSDFXF from ‘navigator’ I only see the most current charts. My EA is sort of medium frequency algo which reads incoming tick flows and tries to predict price for a future horizons. The candles 5m, 15m, are only used for the EA to be able to restart itself everytime…. and also also for some post trade order management. My ea doesn’t use O,H,LC values of any candle either. My objective is to carry out an in-sample test my EA on this 3 months tick data. How do I do that?-
#1889 written by birt January 27, 2012 (1 year ago)
If you wish to backtest it, all you have to do is follow the guide above. Basically, you have to convert your XAUUSD CSV data to an FXT + HST files, copy them to the correct locations and proceed with the backtest. If you want to view the resulting chart, just open a chart after you copied the HST files.
-
#1890 written by Delbru January 28, 2012 (1 year ago)
Hi Birt,
I was finally able to back test some of my signals, but, am still not certain about the quality of my test. For example within my EA is a data recorder which logs data at entry and exit of trades things like prevailing (bid/ask), past few quotes (bid/ask) from the time of the trade, Volume[0] and time of trade ‘Current_Time’ in millisec etc.. into a csv file named after that day. Now, when I ran the back-tests for 5m and 15m after creating .fxt and .hst files (and placing them in the right folders) for 5 days i.e. from 09/02/2011 to 09/07/2011 no such csv file was created. I also felt that the trade data was not very granular i.e. for example if at time 00:00 there is a exit signal for a long or short position the actual exit happened 5 to 7 minutes later. where as when I run the EA live the exit happens almost instantly. Are there ways to make this back test more accurate and that emulates the real-time run? Thanks!
-
#1891 written by Harald January 29, 2012 (1 year ago)
-
-
-
-
-
-
#1892 written by Neo January 26, 2012 (1 year ago)
-
#1893 written by Harald January 26, 2012 (1 year ago)
-
#1894 written by Neo January 27, 2012 (1 year ago)
-
#1895 written by Harald January 29, 2012 (1 year ago)
-
#1896 written by Neo January 30, 2012 (1 year ago)
I know what you mean and you’re totally right…but the WFA people recommend using the Open Prices Only model for the optimization scan that is done before the application then runs the scan again doing walk forward analysis. The only info they need from the initial Optimization test are the parameters used in the EA…accuracy is not important. Then the WFA app takes that info and feeds it into its application that then does the optimization scan over again. Using the Open Prices only for the first step saves time.
Kind Regards,
Neo
-
-
-
-
#1897 written by birt January 26, 2012 (1 year ago)
Harald is correct, you don’t really need the patch or tick data if you want to use control points or open prices only. The CSV parsing script does not produce an FXT that can be used with these models.
However, using the Tick Data Suite will no longer crash so in that respect I guess you could say it works.
-
-
#1898 written by Pawel January 26, 2012 (1 year ago)
-
#1900 written by www.fxfir.com January 27, 2012 (1 year ago)
-
#1901 written by birt January 27, 2012 (1 year ago)
Head to the metaquotes website for that.
-
-
#1902 written by Neo January 27, 2012 (1 year ago)
-
#1904 written by Jane January 27, 2012 (1 year ago)
-
#1905 written by birt January 27, 2012 (1 year ago)
See http://www.dukascopy.com/swiss/english/forex/jforex/third-party-solutions/mt4-jforex_bridge/ or http://www.fairtradingtech.com/dukascopy-and-mt4/ or just Google MT4 to Dukascopy bridge for more information. However, I would recommend going for an MT4 ECN brokerage instead.
-
-
#1906 written by KlamseN January 27, 2012 (1 year ago)
Hi birt, any idea why the 2gb removal doesn’t work for my new laptop?
It’s a Win7 64bit maschine with 8gb ram.2012.01.27 19:39:33 birt’s patch EURUSD,H1: uninit reason 0
2012.01.27 19:39:33 birt’s patch EURUSD,H1: Process already patched for the 2gb limit removal or we just can’t find the area to patch.
2012.01.27 19:39:33 birt’s patch EURUSD,H1: You should check for a new patch at http://eareview.net/tick-data
2012.01.27 19:39:33 birt’s patch EURUSD,H1: The patch you are running was not tested with this build so it may or may not work.
2012.01.27 19:39:33 birt’s patch EURUSD,H1: MT4 build 409 detected.
2012.01.27 19:39:33 birt’s patch EURUSD,H1 inputs: NoFXTOverwrite=false; WARNING1=”The 2GB limit removal only works in Windows 7 and Vista.”; Remove2GBLimit=true; WARNING2=”Using variable spread with a non-variable spread FXT does NOT work.”; RealSpread=false;
2012.01.27 19:39:18 birt’s patch EURUSD,H1: loaded successfullyI already tried to load the patch prior to everything else, but still the same problem. And I still have the limitation of 2gb :-/
Thanks for helping and best regards
-
#1908 written by Marcel January 29, 2012 (1 year ago)
Hi Birt, since the upgrade to build 409 of Metatrader I am not able anymore to use the downloaded tickdata. I think it’s the same kind of issue Meena is experiencing at the moment but I am pretty sure the suggested mistakes are not the reason for this error. It has something to do with build 409 but I don’t know what, I hope you can help me.
I have two different version of Metatrader installed, build 402 and build 409. I have downloaded the tickdata, installed them in exactly the same directories and then ran Dukascopy2FXT and that’s where it goes wrong because when I look at the expert messages of build 409 I see that it’s starting to process i.e EURUSD 2007, 2008 and 2009, but then it jumps to 2012, 2027, 2028, 2029,2030 and 2031. Build 402 is processing the same csv-file correctly without any errors.
After execution of the Dukascopy2FXT-script I copy the fxt- and hst-files to the correct subdirectories (the size of the build 409-files are appr. half of the size of the 402-files) and start a back test in both builds. Build 402 is working fine and build 409 is giving the error: TestGenerator: internal error because the file could not opened.
I am pretty sure it has something to do with the new build. Do you have any idea what it is and if there will be a solution for this problem soon?
Thanks by the way for all the work you have done so far, much appreciated! -
#1913 written by Steve February 2, 2012 (1 year ago)
-
#1915 written by kain February 2, 2012 (1 year ago)
Hi Birt,
Sorry if this sounds stupid, I used your 1min candle script to download 1 min data, and I tried to follow the steps for converting .csv to .hst and .fxt files for mt4. Even
though I got them converted for 1 min and 1 hour, when I looked at the charts in offline mode, the whole screen appears greeen with bars. This is for AUSUSD. Does your script only work from tick data. If so, do I need to modify the script to accept 1 min data as the minimum for higher conversion.I only wish to back test on opening and closing of 1 min data and higher and do not require tick level precision at this moment. I wish to manually test the program as such I need to be able to see data as far back as possible.
I would be happy with any help on this…
Thanks and regards-
#1916 written by birt February 4, 2012 (1 year ago)
The processing script only works with tick data. For candle data, you need to make the import process work on your own (aka write some code for it). I have a tentative script that does that but I gave up quickly on it due to the volume issues. I might decide to publish it as well at a later time but don’t count on that happening too soon because I am extremely busy these days.
-
-
- Comment Feed for this Post
Didn't find any related posts :(
Is any one else having trouble logging in to jforex besides myself and Eddie? I just opened a new demo account this weekend, but it says “authentication failed”. Could it be because it is the weekend?