How to prepare your tick data for Metatrader 4

If you’re reading this guide, I will assume you already downloaded your tick data either from one of the free sources mentioned on the Downloading free tick data page or from your own private source and now you need to use it in Metatrader 4.

Note: please refer to the old version of the guide if you’re using MT4 build 509 or older.

Converting the data

To put it simply, Metatrader 4 does not know how to directly read a CSV file containing tick data and thus it cannot use it in your backtests. However, what it can read is a proprietary file format that contains ticks so all we have to do is convert from our CSV file to FXT, the latter being the format I mentioned. To this end, I wrote a few scripts but later decided to make it less complicated and merged them into a single script that should be able to convert data from pretty much any source and put it into an FXT. One thing to note is that during backtesting, Metatrader 4 also makes use of the HST files when calculating the indicators so in order to have accurate tick data backtesting, you must also have HST files that match your FXT file.

So, what you need to convert is the CSV2FXT binaries that can be found in the tick data downloads section. It’s important to note that for the newer MT4 builds you will need CSV2FXT v0.44 or higher. Metaquotes changed the FXT and HST format after build 509 so all builds newer than that require the modified script. It’s a good idea to get the latest script even if you already have a compatible version.

Here’s a short guide on how to convert the tick data to an FXT file and a series of HST files:

  1. If you haven’t done so already, you have to head to the tick data downloads section and download the CSV2FXT binaries archive.
  2. Copy the files from the zip archive to your MT4 data folder. To find out what is your data folder, open MT4, head to File and click Open Data Folder, which will open an explorer window with your MT4 data folder (typically looks like C:\Users\[username]\AppData\Roaming\MetaQuotes\Terminal\[32_character_hex_string]\). There’s a directory structure inside, make sure the files land in the proper places (CSV2FXT.mq4 and CSV2FXT.ex4 must be in MQL4\Scripts, FXTHeader.mqh must be in MQL4\include, CsvReader.dll must be in MQL4\Libraries). Note that if you are using the /portable switch, your data folder will be the same as the MT4 installation folder.
  3. Move the tick data file (the CSV file) to MQL4\Files in the same MT4 data folder.
  4. Open a chart for the pair that you have data for (if you have an EURUSD.csv file, you MUST open an EURUSD chart).
  5. Select the timeframe that you wish to generate the FXT for. For instance, if you want to backtest on M1, then select M1 as the chart timeframe. Please note that the FXT file that you create for a particular timeframe (even M1) will NOT work for any other timeframe; you simply have to generate a new FXT if you want to backtest on another timeframe.
  6. Ensure that your terminal is connected to the broker (look in the lower right corner, if it says “not connected” you need to fix that before proceeding).
  7. Make sure that DLL calls are allowed. If you don’t know how to do that, you have to open the Tools menu, select Options, select Expert Advisors and ensure that Allow DLL imports is enabled while Confirm DLL function calls is disabled.
  8. Double click the CSV2FXT script in the navigation panel (it’s in the scripts section).
  9. Configure the parameters in the window that pops up.
    • CSV2FXT version – this is a parameter that is only meant to give you a quick indication of what version you have installed. Changing it has no effect.
    • CSV filename – you can leave this blank if the file is named just like the symbol and has a CSV extension (e.g. EURUSD.csv); otherwise, just type the file name.
    • Create HST files – this setting must be true in order to create the HST files that you need for your backtest. You can set it to false if you already generated HST files for the symbol with the same GMT/DST settings and you’re just generating an FXT for a different timeframe. You must create new HST files every time you change the GMT or DST.
      Note: Enabling this setting will create HST files for the whole time span of your tick data file regardless of the time range selected.
    • Spread – the fixed spread of your resulting FXT file, expressed in pips (2.3 will result in a 2.3 pips spread). Leaving it set to the default of 0.0 will make the converter use the current spread of your broker. Please pay attention to the fact that many brokers are widening their spreads during the weekends.
      If you intend to use real spread (the variable spread in your CSV), you can leave this parameter set to 0.0.
      Note: starting from MT4 builds 8xx, the Spread field in the MT4 backtesting pane overrides the spread configured for the FXT unless the FXT is using real spread (see below).
    • Start date and End date – these fields control the time span of the FXT file. You can leave these fields set to their default values (1907.01.01), in which case the converter will just use the whole time range available in the CSV file.
    • Use real (variable) spread – as its name suggests, enabling this parameter will make your resulting FXT use the real (variable) spread from your CSV file.
      The Tick Data Suite will autodetect whether your FXT is using real spread or not so there’s nothing to worry about if you’re using that.
      Note: this parameter makes MT4 disregard the spread configured in the MT4 backtesting UI and use the spread stored in the CSV file in the form of different ask and bid prices.
    • Spread padding – 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 specify 0.8 here.
    • Minimum spread – if any spread is encountered that is lower than the value specified for this parameter, it will be adjusted to this value. This is only applied when using real spread.
    • Commission in pips – if you want your FXT to have a commission, you can configure the desired value here. The figure is round-trip and it is expressed in pips.
      Note: Metaquotes has broken this feature starting from MT4 builds 845 and above. If you need pips commission, I recommend using MT4 build 842 or earlier; alternatively, based on the currency of your backtest you can simply use a money commission that works out to the same amount.
    • Commission in account currency – as an alternative to having the commission in pips, you can also set the commission in money. The value is expressed in base account currency per lot round-trip. If you fill this in, any value specified for Commission in pips will be disregarded.
    • Leverage – changes the leverage of your FXT.
    • FXT GMT offset – if you want your FXT to have a GMT offset other than 0, specify it here.
    • FXT DST setting – the DST setting of your resulting FXT – simply select the DST setting that you would like the file to have. Note that the US DST setting calculates the DST according to the regulations that were applied starting with 2007.
    • CSV GMT offset – the GMT offset of the data in your CSV file. The conversion script is able to autodetect the formats of several free tick data providers and apply the correct setting here, so it’s probably safe to leave it set to “autodetect”. If you get a message in the experts log about the script not being able to identify your tick data source, you can set the CSV GMT offset here manually.
    • CSV DST setting – the DST setting of your CSV. Should be safe to leave it to “autodetect”. Otherwise, use the same guidelines as for the FXT DST setting.
    • Time shift – Enabling this parameter will shift all the generated data 28 years in the past. This is intended for use with EAs that are suspect of having hardcoded days for the purpose of cheating backtesting. The reason behind the 28 year shift is that the calendar is identical when it comes to the days of the week and leap years. This is not a foolproof method and some EAs may have legitimate reasons to yield different results when backtested with a shifted time.
    • Price multiplication factor – All the prices will be multiplied by this value. It’s typically safe to leave this parameter set to 1.0 – don’t change that if you’re converting Forex data. Some brokers use an adapted value for CFDs, indices, metals and so on – instead of the normal price (for instance 12.3456) they will have a value multiplied by a certain value (for example 1234.56); in these cases you have to figure out the multiplier by looking at the chart prices versus the CSV prices.
    • Create M1 FXT, Create M5 FXT, Create M15 FXT, Create M30 FXT, Create H1 FXT, Create H4 FXT, Create D1 FXT, Create W1 FXT, Create MN FXT – These parameters are meant to allow you to create multiple FXT files in a single run. By default, the script will create the FXT for the timeframe of the chart you are running it on, no matter if the parameter for that specific timeframe is enabled or not. Only enable these parameters if you actually need the FXT for a different timeframe.
  10. Click “Ok”. Once you do that, the data generation process will start and it will typically take half an hour to several hours, depending on the data range and volume, possibly even more if you’re using a slow machine. A progress indicator will appear in the upper left side of your chart and when the processing is finished, you will get an alert. During the conversion, some data is being printed in the experts log and if you have any problems with the script it’s probably a good idea to keep an eye on that.

Once you’re done with all the steps above and the script finishes processing, you will be asked whether you want the script to move the files to their proper locations. If you choose Yes, restart the terminal to ensure the HST files are properly synchronised and skip to the next guide (Using the tick data in your backtests). If you choose No, you will have an FXT file and a bunch of HST files in your MQL4\Files folder and before actually using them you need to copy them to the correct location. Proceed with the following steps:

  1. Exit the Metatrader 4 terminal.
  2. Move all .HST files from MQL4\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!
  3. Move the generated FXT file from MQL4\Files to tester\history.

At this point, you’re done with the conversion and setup! You’re now ready to proceed to backtesting, but please note that it’s not as easy as clicking Start in the backtesting user interface. You will have to use some additional tools which are described in the Using the tick data in your backtests section.

If you run into any problems, please head to the FAQ & Troubleshooting page.

  • #498 written by jollydragon June 23, 2015 (1 year ago)

    After I used the script “CSV2FXT”, the 2 issues below found and how to fix?

    1. I downloaded EurUsd.csv from
    I opened M1 chart and convert the EurUsd.csv successfully, then H1 chart also successfully.
    However after testing, the quality is always “n/a”. How can I get the quality improved to over 90%?

    2. After opening the testing chart, I found the weekend data are also in the chart.

    How to remove or hide the data that haven’t any change?

    I followed the script instruction to connect MT4 to my broker before data converting.

    • #499 written by birt June 23, 2015 (1 year ago)

      1. Most likely you were running the backtest without TDS. Make sure the MT4 title bar says “…with Tick Data Suite…”.

      2. Dukascopy doesn’t have weekend data, I’m not sure why it would be there in your backtest. Perhaps the tool that you downloaded the data with has an option to add weekend data?

      • #500 written by jollydragon June 23, 2015 (1 year ago)


        1. What is TDS? How to make the title says ” with tick data suite”? Does it say during data converting or backtesting?
        2. Is there any default settings in MT4 to show the weekend data? I just download the Dukascopy data from here: Did you ever download there too? By the way, I downloaded M1 data from that page.

        • #501 written by birt June 23, 2015 (1 year ago)

          1. TDS is the Tick Data Suite. It’s required for tick data backtesting. You can get a trial at

          2. There are no such default settings. Note that if you want to backtest with tick data, you need tick data, not M1 data. I suggest using a software that assists with the download, such as the SQ Tick Data Downloader.

          • #502 written by jollydragon June 23, 2015 (1 year ago)

            1. No, I don’t need tick data. I need the data of H1. But also need M1 data according to MT4 working way. Correct? Then why is the quality is ‘n/a’ in this case?
            2. Now that there is weekend data, how to deal?

            • #503 written by birt June 23, 2015 (1 year ago)

              If you don’t need tick data simply import the bar data as you can. I can’t help you any further than that because I do not provide MT4 support.

  • #504 written by Michael July 7, 2015 (1 year ago)

    Hi Birt,

    I know you don’t provide support outside of your products, but I’m having an issue you may have encountered/solved already, and I’d be most grateful for your thoughts.

    The .CSV files containing my tick data are huge – approximately 10GB for a year. Is this an abnormal size? The tool I’m using to download my tick data (from a broker called LMAX) struggles to create files bigger than this so I am stitching multiple .CSVs together at the moment. Is this a common problem, and if so, how do you get around it?

    Also, does the CSV2FXT tool support CSV files where the date/time variable is denoted in UNIX/Epoch time?



    • #505 written by birt July 7, 2015 (1 year ago)

      It’s normal to have such huge files with the tick density of large ECNs such as LMAX.

      CSV2FXT does not currently support unix timestamps. You could try to modify it, but the modification would be quite extensive. I will look into this matter but I would expect a few months turnaround.

    • #506 written by Vijay April 20, 2016 (9 months ago)

      Hi Michael,

      How did you manage to stitch those huge files.? I cant even Do that, please guide.



  • #507 written by Adrian July 23, 2015 (1 year ago)


    If my CSV files have some prices to 3 decimal places, some to 4, and some to 5, how will this be handled by MT4/CSV2FXT?

    So I mean, if EURUSD was at 1.178 at some point, that how it’s printed in my CSV rather than as 1.17800.

    And if it was at 1.1784 at some point, that’s how it’s printed instead of 1.17840.

    Does this affect data quality/reliability in anyway?


    • #508 written by Adrian July 24, 2015 (1 year ago)

      Hi Birt,

      Do you have any advice regarding this issue?



      • #509 written by birt July 24, 2015 (1 year ago)

        Actually I replied yesterday but I must’ve forgot to hit Post Comment or something.

        Long story short, it doesn’t matter, the script reads the price from the CSV and the number of digits from the chart that you ran it on and it’s able to handle everything like that nicely.

        • #510 written by Adrian July 30, 2015 (1 year ago)

          Thanks for that info.

          Another question:

          Do the ticks in your CSV file have to be ordered in linear time fashion?

          So theoretical Tick 1 at time t must be in row A and Tick 2 at time t+1 must be in row B?

          Or does CSV2FXT not care?



          • #511 written by birt July 30, 2015 (1 year ago)

            If it finds a timestamp in the past of the previous timestamp it makes a note in the log and discards it.

            Basically if we have:
            22:05:05 tick1
            22:05:04 tick2

            tick2 will get dropped.

  • #512 written by Alex July 24, 2015 (1 year ago)

    Hi Birt,
    I tried using your TDS and although it works perfectly with the instructions that you have provided I run in a problem and was wondering if you could help.
    When I run a normal backtest with all goes well, but when I run optimization for lets say 8 different values of an input it doesn’t always return Optimization results. To make sure that the values I used gave any positive profit results to be even considered Optimal results I run them manually one by one (without the optimization box checked) and found that 1 of them was actually profitable.
    Because I need to use the optimization option a lot to valuate the EAs I make I wanted to know if I can do something before I buy your program.


    • #513 written by birt July 24, 2015 (1 year ago)

      The first thing you should do is right click the optimization results pane and uncheck “Skip useless results”. This will show even non-profitable optimization runs. You can then use the result that you thought would be profitable, run the same params in a regular backtest and compare the outcome – they should be identical. If they aren’t, make sure that you have slippage disabled.

  • #514 written by Steve August 6, 2015 (1 year ago)

    Dear Birt’s
    How can I prepare the FXT file with BRENTCMDUSD & LIGHTCMDUSD from dukascopy?
    thank you!

    • #515 written by birt August 6, 2015 (1 year ago)

      Find an MT4 broker that has these symbols and convert the data using CSV2FXT.

      • #516 written by STEVE August 7, 2015 (1 year ago)

        Sorry Birts
        I mean when I use the CSV2FXT done, the FXT I testing always stop and in my journal it show the “exchange rate cannot be calculated”.
        thank you!

  • #517 written by Mike September 8, 2015 (1 year ago)

    Hi Birt,

    I’m testing with a broker that charges commission (ECN broker). Even though I don’t specify anything in the commission section of CSV2FXT, the backtester is subtracting $7 per lot from each trade.

    Is there a way of overriding this when creating the FXT/HST files?



    • #518 written by birt November 23, 2015 (1 year ago)

      It’s an issue with MT4 builds 8xx. Builds 9xx are once more using the commission from the FXT.

  • #519 written by Vinisius September 12, 2015 (1 year ago)

    Hello Birt.

    I see what CSV Dukas historical’s files of CFD’s DAX30 is with 0 or 1 or 2 or 3 decimals:

    … 10186.5,10188.27 ..,.
    … 10185.691,10186.692 …

    My 2 brokers:

    ActivTrades with 1 decimal …. 10176.5
    and FXCM with 2 decimals …. 10186.00

    which I put in the settings in CSV2FXT script …. extern double PriceFactor ???.


    • #520 written by birt September 13, 2015 (1 year ago)

      You don’t need to specify anything, it will automatically get adjusted to the number of digits on the broker that you are connected to when converting. E.g. on ActivTrades 10185.691 will become 10185.7 while on FXCM it will become 10185.69

  • #521 written by Vinisius September 13, 2015 (1 year ago)

    Ok Birt.

    Then …when should be used ?.

    You could give an example with any product in which should set different default of PriceFactor ?.


    • #522 written by birt September 13, 2015 (1 year ago)

      If your CSV had 10185.691 and the same price on your broker would be 1018.56, you would use a PriceFactor of 0.1. I’ve only seen such a scenario once or twice, though.

  • #523 written by Vinisius September 13, 2015 (1 year ago)



  • #524 written by Vinisius September 19, 2015 (1 year ago)

    Hello Birt

    In the CSV2FXT script I can see the following code from the line 2373 to 2379.

    bool HasExtraDigit() {
    // add code here if you’re backtesting a symbol with strange particularities, such as a misc CFD or e.g. XAGJPY

    if (Digits % 2 == 1) {
    return (true);
    return (false);

    Does this code mean the same as this one? :

    if(Digits==3 || Digits==5){
    else pt=Point;

    Also if your function returns false not do anything?.


    • #525 written by birt September 19, 2015 (1 year ago)

      More or less, yes. The function does not only act on the point. My form is equivalent to if (Digits == 1 || Digits == 3 || Digits == 5 || Digits == 7…). The function only works properly for Forex symbols and should be modified for CFDs and metals.

  • #526 written by Vinisius September 19, 2015 (1 year ago)

    Then the CSV2FXT script does not work well for XAUUSD or CFDs?.

    But if on the web you say that the script too works on these products.

    I don’t understand.

    • #527 written by birt September 20, 2015 (1 year ago)

      It does, but they are not as standardized as Forex. Most of the time it will just work but in some particular cases you have to make some adjustments to make them work properly.

  • #528 written by Vinisius September 20, 2015 (1 year ago)

    XAUUSD (Gold) o Dax30 CFD need some adjustaments to make them work properly ?.


    • #529 written by birt September 20, 2015 (1 year ago)

      It depends on your broker and on your data source. If you have any further support questions, please address them via email.

  • #530 written by Stuart November 11, 2015 (1 year ago)

    Hi Birt

    I have a couple of quick questions:
    1. Will the downloading and preparing the data instructions you give work if not using TDS?
    2. The EA I have developed is time sensitive, ie I want it to trade only at specific times of the day, when using CSV2FXT script, do I need to set the GMT offset to match that of my broker?


    • #531 written by birt November 11, 2015 (1 year ago)

      1. There are quite a few things that will not work.
      2. If your EA is expecting the GMT offset of your broker in backtesting, then yes. Be careful with the DST configuration.

      • #532 written by Stuart November 12, 2015 (1 year ago)

        Thanks Birt

        So I live in the UK (currently GMT) my broker candles are 2 hours ahead of me so do I need to run the CSV2FXT script with a GMT offset of +2. DST settings should be Europe based I guess?

        • #533 written by birt November 12, 2015 (1 year ago)

          Probably but you should ask your broker to make sure. The information might be in their FAQ.

  • #534 written by steven November 11, 2015 (1 year ago)

    HI, i can not get XAUUSD to test, all other pairs ok, do i have do do something different?

  • #535 written by steven November 11, 2015 (1 year ago)

    i think i have fixed it now, not enough balance lol

  • #536 written by Desmond December 9, 2015 (1 year ago)

    Hi Birt,

    I noticed in Tick Story they have a function that exports to MT4 directly and is able to create the HST files and make the FXT files read-only. Is this enough for Tick Data Suite to use to backtest?


    • #537 written by birt December 9, 2015 (1 year ago)

      Yes, that should be enough. However, if you’re using build 920 and having problems please update to TDS v1.4.1 as I mentioned in reply to your other comment.

  • #538 written by delbroooks January 10, 2016 (1 year ago)

    Hi Birt, I was trying to use your patch to run a simulation on tick data. As per instructions I went to dukascopy and obtained two days worth of tick data for USDJPY.
    I placed the USDJPY file in MQL4/files/USDJPY.csv. I placed all other dll and script files in their correct locations. Now when I double click csv2fxt script from the MT4 terminal (M1) and input the filename USDJPY.csv I get the error message “Can’t Open input file: USDJPY.csv”. Please advice where I could be wrong. my USDJPY.csv file looks like this.
    Time (UTC) Ask Bid AskVolume BidVolume
    2015.12.01 04:00:19.942 122.879 122.876 1.75 2.25
    2015.12.01 04:00:20.297 122.88 122.879 1.1 1
    2015.12.01 04:00:20.399 122.881 122.877 2.25 1.2
    2015.12.01 04:00:20.820 122.878 122.875 1.5 1.87

  • #540 written by Henry January 12, 2016 (1 year ago)

    Hi Birt,

    By comparing the MT4 clock to GMT time, I observed my broker has GMTOffset of GMT+2 during winter and GMT+3 during summer. Funny their FAQ constantly show their GMT offset is GMT+3.

    When using CSV2FXT, shall I constantly input GMT+3 and select European DST or shall I follow MT4 clock, input +2 during winter and input +3 during summer and how about the DST?

    I hope you don’t mind to clarify, I am confused.

    Kind Regards

    • #541 written by birt January 12, 2016 (1 year ago)

      You have to enable DST if you want to match your broker’s time. I don’t know if you should select EU DST or US DST, though – you will have to figure out when does the shift occur and select based on that.

      • #542 written by Henry January 12, 2016 (1 year ago)

        Hey Birt,

        Thank you for your quick reply but for my case, what GMT value shall I use?

        Is it dependent on when I run the CSV2FXT
        GMT+2 during winter, GMT+3 during summer
        OR I just input GMT+2 or GMT+3 all time?

        May I have your recommendation please?

        Thanks again!

        • #543 written by birt January 12, 2016 (1 year ago)

          Sounds like GMT+2 with some sort of DST but I cannot recommend which type of DST, you will have to ask your broker or empirically determine it. Or you can just wing it and select e.g. EU DST.

  • #544 written by davide March 21, 2016 (10 months ago)


    i could set the slippage parameters in the backtest analysis?

    Thank you

    • #545 written by birt March 21, 2016 (10 months ago)

      You can set the slippage parameters in TDS Configuration. Note that they apply only to backtests started after the parameters were configured (e.g. if you have an ongoing backtest it will continue running as before, whereas any new backtests started after configuring slippage will use the specified settings).

  • #546 written by SuperFan April 12, 2016 (9 months ago)

    csv2fxt proess,
    if Create M1 FXT is false, but it still creat M1 FXT file.
    Did you know? is it bug?

    • #547 written by birt April 12, 2016 (9 months ago)

      It always creates the FXT for the timeframe of the chart that you run the script on. It’s a feature that is there for convenience, not a bug – if you leave all the CreateXXFXT disabled it’ll still create the FXT for the chart timeframe.

  • #548 written by Vijay April 20, 2016 (9 months ago)

    I download the CSV file and this Error pops up, what to do.?

    This message can appear due to one of the following:
    ⦁ The file contains more than 1,048,576 rows or 16,384 columns. To fix this problem, open the source file in a text editor such as Microsoft Office Word. Save the source file as several smaller files that conform to this row and column limit, and then open the smaller files in Microsoft Office Excel. If the source data cannot be opened in a text editor, try importing the data into Microsoft Office Access, and then exporting subsets of the data from Access to Excel.
    ⦁ The area that you are trying to paste the tab-delineated data into is too small. To fix this problem, select an area in the worksheet large enough to accommodate every delimited item.
    ⦁ Excel cannot exceed the limit of 1,048,576 rows and 16,384 columns.
    ⦁ By default, Excel places three worksheets in a workbook file. Each worksheet can contain 1,048,576 rows and 16,384 columns of data, and workbooks can contain more than three worksheets if your computer has enough memory to support the additional data.

    • #549 written by birt April 20, 2016 (9 months ago)

      You’re not supposed to use Excel, it’s not meant to work with such files.

      If you take a look at the Downloading free tick data page, a solution for concatenating large files is presented there, in the Pepperstone/Integral section.

      Finally, if you’re not proficient with this sort of operation, I would recommend starting with Dukascopy data, downloaded by means of a GUI downloader such as SQ Tick Downloader. In this case you can directly process the CSV file with no additional operations.

      • #550 written by vijay April 20, 2016 (9 months ago)

        Can you please tell a step by step, guide, i am not so good with backtesting, and stuff, i get the CSV file from SQ tick dowloader, and i as i am not so proficient with all this, please provide a step by step, guide, cause., every csv tick file data i download, it produces me the same above Error of huge file sizes, and huge number of rows. Please help !

        • #551 written by birt April 20, 2016 (9 months ago)

          Do NOT open the file in Excel. Forget about opening the CSV file.

          Also, scroll up, there is a detailed step by step guide that tells you exactly what to do.

      • #552 written by vijay April 20, 2016 (9 months ago)

        I downloaded the zip file from the above link.! And the problem remains the same..!

        • #553 written by birt April 20, 2016 (9 months ago)

          You need to stop trying to open the file. Don’t press enter on it or double click it. Simply read the full guide at the top of this page and perform the steps detailed in it.

          Also, I would strongly recommend focusing on Dukascopy data to begin with. The other data sources are more complicated to handle.

          • #554 written by Vijay April 20, 2016 (9 months ago)

            I did everything stated above and once i hit OK, on the script with the right settings in place,

            An Error message popped up on my terminal saying

            -“Cannot open input file GBPJPY.csv”

  • #556 written by Vijay April 20, 2016 (9 months ago)

    I am using SQ tick downloader.!

  • #557 written by Vijay April 20, 2016 (9 months ago)

    I did put that file in ->mql4/files as stated above, and i even put the correct name in the configuration of script.

    • #558 written by birt April 20, 2016 (9 months ago)

      Please read the FAQ, it covers every possible user error case.

  • #559 written by Vijay April 20, 2016 (9 months ago)

    I Even refer to the troubleshooting page, and followed the steps, even tried to name the file name as it is.! Still no good, ! here is my email- please get in touch so i could send you some screen shots and maybe we can figure it out!

    • #560 written by Vijay April 20, 2016 (9 months ago)

      I tried to do as suggested, in the FAQ’s still no good,

      • #561 written by birt April 20, 2016 (9 months ago)

        Sorted out via email. The FAQ did actually contain the relevant info.

    • #562 written by Jon August 21, 2016 (5 months ago)

      TickStory is actually a better program for creating csv file because you can pick date range and customize the {Symbol}.csv where {Symbol} will take the name of the trading symbol and make it part of the file name. You can also pick the destination folder. So you can just place it in the \files folder.

      e.g. C:\[path to mt4 install\MQL4\Files\{Symbol}.csv

      I always launch mt4 terminals in /portable mode so that they are easier to find on hard drive.

      Tickstory is much more straightforward to generate csv of ticks vs SQ tick data downloader.

  • #563 written by Jon June 23, 2016 (7 months ago)

    Is it possible to convert tick data into seconds data for the FXT file? I was thinking that would be a good go-between for pure tick data (too refined) and 1 minute bars (too coarse).

    Was wondering how to proceed with this or if you could write a script to do this and still have TDS process it without the end user having to do any adjustments to their EA?

    • #564 written by birt June 23, 2016 (7 months ago)

      Maybe if you play with custom timeframes, don’t know.

  • #565 written by Jon August 21, 2016 (5 months ago)

    In regards to the seconds rounding, it is more about attempting to still have small granularity but not necessarily needing to store every tick. Like having an option to emulating 5 second of data, you would only have movement 12 times per minute bar (maybe more if you emulate the OHLC of the 5 seconds bar). Could increase this to xx seconds that is a multiple of 60 seconds (1 minute)

    Your csv2fxt could possibly do this.

    Sometimes I have backtest that slow to a crawl and I am unsure why that is the case. Running a sophisticated grid strategy intraday that requires every tick to update equity and many other functions. It is almost always in the market. It appears to go somewhat quickly at first. But after a couple of months it can slow down significantly. It could be Process Lasso, but I wanted your take on it.

    • #566 written by birt August 21, 2016 (5 months ago)

      It’s most likely a problem with the EA that could use some optimization.

      The seconds thing is not going to happen, sorry. Or at least I don’t intend to work on it in the foreseeable future.

      • #567 written by Jon September 14, 2016 (4 months ago)

        We were able to deduce that the majority of the problem was that EA creates objects when backtesting, even if ‘visual mode is off’. Too many objects that the EA must process every tick will eventually slow down the backtest.

        We created a function to delete trade objects immediately after they are created (the open arrows, close triangles, and the trendlines that connect the 2). This along with limiting other indicator’s maximum historical objects generated kept the total objects down to around <100 throughout the backtest. A 1 year backtest that was taking as much as 30+ hours was cut down to 6-7 hours.

        Previously we had about 500-1000 accumulating objects per trading day! Again, doesn't matter if tester is running with visual mode on or off, it is still generating/processing the objects.

        You can check by adding the function after the void onTick {}

        // Print number of objects created by backtest every 3 hours
        if ( TimeCurrent() % 10800 == 0 )
        Print( "Object Count ", ObjectsTotal());

        And TDSv2 makes the backtesting much easier now without having to store FXT files.

        • #568 written by birt September 14, 2016 (4 months ago)

          Good job figuring out what was slowing it down and thanks for posting here. I’ll keep it in mind.

  • #569 written by Jon August 24, 2016 (5 months ago)

    I have a better idea that should be easier to implement and would provide a good compromise. When generating CSV file or fxt file, why not have an option to “skip every x tick” ? x amount of ticks to evaluate before skipping the next tick.

    x=0 // disable; process all ticks
    x=1 // skip every tick (not used unless you want empty file)
    x=2 // skip every other tick
    x=3 // skip every 3rd tick
    x=4 // skip every 4th tick
    etc, etc

    This reduces the accuracy to some degree, but would also reduce total amount of ticks saved in fxt file, making the backtest faster. It is a tradeoff, but should be quick to program. You can also ignore duplicate ticks as counting towards the tick skip sequence.

    • #570 written by birt August 24, 2016 (5 months ago)

      The whole idea of the Tick Data Suite is to allow backtesting with accurate data, not to reduce the accuracy of the available data.

      If you want to have something like that, go right ahead and add the option: the source code for CSV2FXT is available, you can add it yourself or contract someone to do it.

      Note that it’s also very easy to implement a tick counter in your EA and skip ticks at the beginning of the OnTick() function.

  • #571 written by Matt August 27, 2016 (4 months ago)

    Hey Birt,

    Thanks for the complete guide! Ive followed every step, but chose “Variable Spread” however when tester finishes it displays spread used as current spread. Does this mean it has tested using the variable spread in the .CSV file but still displays the current spread by default? Thanks for your help!

    • #572 written by birt October 16, 2016 (3 months ago)

      Sorry for the delay in replying, missed this comment while I was away on vacation.

      The current spread displayed at the end has no impact on the actual spread used in the backtest.

      It’s worth noting that with TDS2, the report will mention it if you used variable spread.

  • #573 written by Howard November 27, 2016 (1 month ago)

    Hi, my fxt of last date is 0 and time is 1970.01.01 0:00. How to solve this problem?

    • #574 written by birt November 27, 2016 (1 month ago)

      If you’re using Tick Data Suite 2, there is no problem, it always creates a 0-sized FXT file when backtesting with tick data if another FXT is not already there.

  • You may use these HTML tags: <a> <abbr> <acronym> <b> <blockquote> <cite> <code> <del> <em> <i> <q> <s> <strike> <strong>


  • Comment Feed for this Post
Go to Top