How to backtest using tick data – the Tick Data Suite guide

This guide assumes that you already downloaded your tick data and processed it into an FXT file and several HST files, all of which were copied in the proper locations. If you haven’t completed the steps above, please visit the How to download free tick data and the How to prepare your tick data for Metatrader 4 guides.

First of all, you have to use the Tick Data Suite installer (available on the tick data downloads page). After the install process is finished, it will automatically run the Configuration tool; you should use this opportunity to install the Tick Data Suite in the Metatrader 4 folders that you want to use it with by using the Select Path button, navigating to the path of your choice and finally pressing the Copy TDS button which will activate the Tick Data Suite with the selected terminal and will prompt you about the placement of an icon on the desktop for easier access.

Once the Tick Data Suite was installed, all you have to do is start it Metatrader 4 via the desktop icon or simply double click tds.exe in the Metatrader 4 folder. That’s all there is to it, really. It will start your Metatrader 4 terminal and all the features will be enabled: there will no longer be a 2 GB limitation, FXT files will not get overwritten, variable spread FXT files will automatically get detected and tick data backtests and optimizations will work (assuming you are using tick data FXT files).

Multiple Metatrader 4 installations

If at a later time you wish to use the Tick Data Suite with a different Metatrader 4 terminal on the same computer, simply execute the TDS Configuration program (located in Tick Data Suite in your Start Menu Programs folder) and repeat the process outlined above: select the path of the Metatrader 4 terminal that you want to use it with and click Copy TDS. Once you’re done with that, in order to start the selected Metatrader 4 terminal with tick data operation enabled you can either use the desktop shortcut (if you chose to create one) or you can navigate to its folder and double click tds.exe.

Slippage configuration

Important information

Starting with v1.1.9b, the Tick Data Suite also allows simulating slippage in backtests. The slippage configuration is not a walk in the park so I will try to describe it here and offer some examples. The slippage settings can be accessed in the TDS Configuration tool, located in Start -> All Programs -> Tick Data Suite.

First thing you need to know is that slippage can be completely disabled or enabled by using the Enable slippage features checkbox. If you wish to have no slippage at all in your backtests, just leave it disabled (which is also the default value).

The second very important thing is that the slippage parameter sent with the OrderSend() calls in your expert advisor matters. If your EA slippage parameter does not meet the slippage configured in the Tick Data Suite (it must be larger or equal), you will receive OrderSend error 138 errors in your backtest (error 138 is requote). The slippage is fully randomized using the current tick price as its base so attempting the order again after such a requote error will result in a different slippage value. As such, if your EA is using a slippage value that is too small for the slippage configured in the Tick Data Suite and at the same time it uses an order retry loop, it will effectively retry until it gets a slippage that is acceptable, thus the slippage that you get in the end will be within the value configured in the EA, not the values configured in the Tick Data Suite. Simply put, when enabling slippage you need to make sure that the slippage setting in your EA is larger than the maximum slippage configured in the Tick Data Suite. A special case is constituted by pending orders (stop & limit) and by SL and TP hits – the slippage requested by your EA is completely disregarded for these orders; in other words, the slippage requested via OrderClose() is always honored but the slippage requested via OrderSend() is only acknowledged for market orders. Also, it is very important to note that the slippage value passed to OrderSend is in points (not pips) so for a broker with 5 digits, you have to use a value of 10 for a maximum allowed slippage of 1.0 pips.

Third, all the slippage is logged in your backtesting journal. Take a look in there to get an idea how much slippage each order received.

If you’re using the Tick Data Suite with a 4 digit broker (although I would strongly recommend against that since you lose the 5th digit precision that comes with pretty much all tick data), the slippage is rounded to the closest integer value. For example, a slippage of 1.5 pips becomes a slippage of 2 pips and a slippage of 1.4 pips becomes a slippage of 1 pip.

Before we delve into the actual settings, another thing that you should know is that you don’t need to restart your Metatrader 4 terminal for the slippage settings to take effect. All you need to do is start a new backtest and the settings will take effect immediately. Note the settings will not be applied if a backtest is in progress – you must stop it and restart it for the new settings to come into play.

The actual slippage configuration

The settings that control the slippage range are Max favorable slippage and Max unfavorable slippage – they allow you to configure how much slippage can be experienced by your orders in your backtests. If you set Max favorable slippage to 1.0 and Max unfavorable slippage to 1.5, it follows that you might get between 0 and 1.0 pips positive slippage and between 0 and 1.5 pips negative slippage. Please note that by “favorable” (positive) slippage, we understand slippage that favors you, in essence a better price – in the case of a long order, this means a price that is below the current Ask quote; in the case of a short order, it means a price above the current Bid quote. Similarly, “unfavorable” (negative) slippage means slippage that results in a deficit for you – for long orders, a higher price; for short orders, a lower price.

The Custom % chance to slip setting controls what percent of your orders will have slippage. If you set this to 50, half of your orders will have a slippage of 0 pips. If you set it to 75, a quarter of your orders will have a slippage of 0 pips. Please note that it is still possible for the other orders to end up with a slippage of 0 pips so the percent of orders with 0 slippage will be slightly higher in the end, depending on the max slippage values configured. In short, with a setting of 75 as in the example above, for 75% of the orders slippage is computed normally while for the other 25% of the orders slippage is completely skipped. This setting is disabled by default, meaning that all your orders will have slippage (and some of them might have a slippage of 0 pips because the slippage range is between 0 and MAX).

Custom % favorable odds is a somewhat tricky setting. Enabling this setting changes the slippage behavior in a significant way:

  • When this setting is disabled (the default), slippage is simply calculated randomly as a number between -MAX_UNFAVORABLE_SLIPPAGE and MAX_FAVORABLE_SLIPPAGE (both values included).
    So, if you set Max favorable slippage to 1.0 and Max unfavorable slippage to 3.0, you may get slippage in the range of -3.0 to 1.0. There is an equal chance for each value to show up, so, for example, -1.5 will appear about as often as 0.7. This means that with the given -3.0 to 1.0 range, there will be a 75% chance to have negative slippage and a 25% chance to have positive slippage.
    As a second example, if you set Max favorable slippage to 1.0 and Max unfavorable slippage to 1.0, you will have slippage in the range of -1.0 to 1.0, with a 50% chance to get positive slippage.
  • When enabling Custom % favorable odds, it allows you to control how many of the trades with slippage will have positive slippage.
    Setting Custom % favorable odds to 50, Max favorable slippage to 1.0 and Max unfavorable slippage to 3.0 will mean that for 50% of the orders that slip you will get a positive slippage between 0.0 and 1.0 while for the rest of 50% you will get a slippage between -0.0 and -3.0.
    If you use a value of 25 for Custom % favorable odds, 2.0 for Max favorable slippage and 2.0 for Max unfavorable slippage, you will get favorable slippage between 0.0 and 2.0 for 25% of the slipped orders and unfavorable slippage between -0.0 and -2.0 for the rest of the 75%.

What is very important to note is that the Custom % chance to slip affects the resolved percentages influenced by the other settings. If you set Custom % chance to slip to 80 and Custom % favorable odds to 50, it means only 80% of the trades will have slippage and 50% of those (so 40% of all the trades) will have positive slippage while the rest of 50% (again 40% of all trades) will have negative slippage.

The Custom % chance to slip and Custom % favorable odds are meant for fine tuning. If in doubt, just leave them disabled (as they are by default) and tweak your Max favorable slippage and Max unfavorable slippage settings.

The other slippage settings are somewhat self-explanatory.

Limit orders have slippage controls whether your pending limit orders (buy limit, sell limit) will experience slippage when they are opened.

Similarly, Stop orders have slippage controls whether your pending stop orders (buy stop, sell stop) will have slippage when they come into play.

The Auto-closed orders (SL, TP) have slippage obviously refers to the Stop Loss and Take Profit orders and, if enabled, will result in the SL and TP closings of your position having slippage. Please note that this also includes orders that are closed at stop (either the end of the backtest or a stop out).

Finally Slippage during optimizations lets you enable or disable slippage while you are running optimizations. I strongly recommend leaving this disabled (as it is by default) because it ultimately leads to different results with the same parameters due to the randomization of slippage, thus potentially making you disregard optimization results that might otherwise be promising.

3rd party software

What is a bit more tricky is using the Tick Data Suite with 3rd party products which assume they have to open terminal.exe. If you run into such a product, you have to rename the original terminal.exe to one of the following:

  • terminal.bak.exe
  • mt4.exe
  • terminal_.exe

then you have to rename tds.exe to terminal.exe. Since command line parameters are seamlessly passed, any 3rd party product should work without problems. The Walk Forward Analyzer author was gracious enough to add a simple checkbox that allows using the Tick Data Suite even without having to rename.

Potential issues with 3rd party software

When using 3rd party tools that automate backtesting and optimization, some problems may come up with EAs that require a connection to the broker even when they are running in a backtest, for example Wallstreet Forex Robot or FAP Turbo. This is caused by the fact that the backtest/optimization are starting too fast since the data is already there. You will know you’ve run into this problem if your EA works fine with the 3rd party tool of your choice with history center data, but refuses to trade when you’re using tick data; it’s typical for EAs that authenticate the account number with their server. There is a workaround for this issue that involves increasing the backtest start delay via the Configuration program – just set it to something like 3 and you should be fine.

  • #1 written by San4x March 10, 2012 (4 years ago)

    Hi Birt,

    Excellent new section…and very nice tool (tds.exe).
    Great work, congratulations.

    Cheers, San.

  • #2 written by John Hunter March 19, 2012 (4 years ago)

    Hey Birt,

    I’ve just gotta say you have done an incredible job of turning a very complex process into something that is almost push-button.

    Well done!

    • #3 written by birt March 20, 2012 (4 years ago)

      Actually it’s pretty far from push-button, what with having to download and process the data plus copy the files, but I’m glad the process doesn’t seem complicated to you πŸ™‚

  • #4 written by Benjamin April 23, 2012 (4 years ago)

    Hey Birt,

    your tds is an awesome tool, great job πŸ™‚
    For v1.08 you may consider the following two options
    a) integrate a button which converts unprofitable EAs into some kind of an endless ATM
    b) integrate a feature which allows to backtest and optimize brokers with fixed commissions (e.g. my broker gets 0.5EUR per 0.1 Lot; 1EUR for 0.2 Lot, 1.5EUR for 0.3 Lot aso)
    is this even possible? aren’t there any other guys requesting this?


    • #5 written by birt April 24, 2012 (4 years ago)

      Glad you liked it! πŸ™‚

      a) Uhm, yeah, I wish I could. On the same topic, a feature was planned for v1.0.8 that would credit the user’s Paypal account with $10000 each time it was pressed but it will not make it in due to technical issues (“Error: insufficient funds”).

      b) You can already simulate that indirectly by using a pip-based commission and calculating the pip value for 1 lot versus the EUR value, converting to USD (or whatever the account base currency is) and multiplying by your commission with the drawback that the EURUSD exchange rate at which the commission is calculated would be constant during the backtest. Adding the option for money commission to CSV2FXT is not such a good idea because I already get enough questions about it as it is and it would only serve to further confuse people. You can easily change it by editing FXTHeader.mqh and replacing COMM_TYPE_PIPS with COMM_TYPE_MONEY around line 88 and recompiling CSV2FXT afterwards. Note that if you do that, the commission parameter in CSV2FXT will no longer be expressed in pips, but in money using the base account currency.

  • #6 written by Thiago August 22, 2012 (4 years ago)

    In settings, what is it and how does the “Backtest delay factor”?

    • #7 written by birt August 22, 2012 (4 years ago)

      See “Potential issues with 3rd party software” above. It’s meant for programs that start MT4 with an INI file and automatically start a backtest – some EAs won’t work in such a case because they expect a connection to the broker server to be made before they authenticate.

      For example this setting is required to use the Tick Data Suite in conjunction with the Walk Forward Analyzer for optimizing EAs that authenticate with a server (such as FAP Turbo).

      Bottom line is: if you don’t use the Walk Forward Analyzer or any other 3rd party tool that automatically runs MT4 and starts a backtest, never change this delay.

  • #8 written by Thiago August 28, 2012 (4 years ago)

    Ok .. so how do I configure it? What should I put? 1 or 2, etc.? I’m using the Walk Forward Analyzer. I look back!

    • #9 written by birt August 28, 2012 (4 years ago)

      You should configure it to 0 unless you run into problems when backtesting one of your EAs (e.g. it takes no trades). If you encounter such a situation, try setting it to something like 3 which should be enough to let the terminal connect to the broker.

  • #10 written by Thiago August 28, 2012 (4 years ago)

    Ok …Thanks for the comeback! I tried with 2 EAs, which are the Megadroid and or GPS2, and the two made no activity, but using along with the WFA.

    • #11 written by birt August 28, 2012 (4 years ago)

      Megadroid requires server authentication and validates your account number, so it needs your MT4 terminal to be connected to the broker. Set the Delay setting to 3 to achieve that. If you still get no trades, verify that it works in a normal backtest (no optimization). If it doesn’t, use visual mode and the backtesting journal to find out more information.

      As for the GPS2, isn’t that a signal service? If so it’s not possible to backtest it.

      • #12 written by Thiago August 28, 2012 (4 years ago)

        My question is if I leave the Back delay factor 3 for all my EAs. Have a problem?
        The “Forex GPS 2” is an EA, being the same as you have disclosed that haven’t done tests.

        • #13 written by birt August 28, 2012 (4 years ago)

          If you leave it set to 3 the only problem is that you experience a slight delay every time you start a backtest.

  • #14 written by tdsuser September 2, 2012 (4 years ago)

    The new slippage simulation is amazing, IΒ΄ve just configured it for the values of my own broker (calculated everything via a Excel file of 2000 past trades on my broker), also the special ones like favorite odds, was able to calculate all that via Excel and input it into the TDS config. ItΒ΄s a real eye opener for backtests – thanks a lot. ItΒ΄s a very important feature that can hugely affect live-trading and hence a backtest on a strategy, especially for scalping EAs. Equity almost did go down by half thanks to this simulation and matches up very close to my live-trades. Keep it up, that is a absolute unique feature and must have been a pain to code! Good work!!!

    • #15 written by birt September 18, 2012 (4 years ago)

      It was quite complicated indeed but I am satisfied with the result and I’m really glad to hear that people who tried it like it as well. Since there were no problems so far, I will probably make a release of it next week.

  • #16 written by L. September 12, 2012 (4 years ago)

    I can’t install this thing to the MT4 folder. It alway displays that it can’t install it there. Really annoying. How this thing can be used? Is there any other (simple) way to do 99% quality backtests?

    • #17 written by birt September 12, 2012 (4 years ago)

      That would be most likely because your MT4 folder is in Program Files and you have UAC enabled.

      There are several possible solutions:

      • Move your MT4 folder from Program Files to a folder not affected by UAC (e.g. to the Desktop). Install TDS using the Configuration tool after you moved it.
      • Head to Start -> Programs -> Tick Data Suite, right click the Configuration program and select Run as Administrator. You should now be able to install it to your MT4 folder. Note that if you do this, your MT4 is still affected by UAC and you might run into other problems with the files.
      • Disable UAC. See the FAQ for more information. I wouldn’t recommend this, though.
    • #18 written by birt September 12, 2012 (4 years ago)

      Forgot to mention that there is no other way that I know of to run tick data backtests.

  • #19 written by Thiago October 24, 2012 (4 years ago)

    TDS works also for MT5? If not, when will work? I see that the MT5 has many advantages on top of MT4, as a test for integrated front for example.

    • #20 written by birt October 24, 2012 (4 years ago)

      No, TDS does not work with MT5. Currently, I have no plans to make it work with MT5, the platform is largely unpopular – in other words there’s not much stuff to backtest and consequently no demand.

      • #21 written by Thiago October 24, 2012 (4 years ago)

        Ok! Without problems. Now have another who wants to choose to proceed to the MT5 as well.

        If you allow me, I leave here a link saying about the advantages of MT5-

        Even more!

  • #22 written by Thiago October 24, 2012 (4 years ago)

    How to work with multiple MT4 and use only a history? It is possible this? This would save space on my HD because I am having to copy and paste large histories for each of the MT4 platforms.

    • #23 written by birt October 24, 2012 (4 years ago)

      Just double-click the TDS shortcut (or tds.exe) several times. It lets you start as many MT4 instances as you want, all from the same folder.

      • #24 written by Thiago October 24, 2012 (4 years ago)

        What good can be done this way! Will be testing now! I installed a platform for each EA tested.

      • #25 written by Thiago October 24, 2012 (4 years ago)

        And with the WFA has any way to work so well?

        • #26 written by birt October 24, 2012 (4 years ago)

          I don’t know, sorry.

  • #27 written by Thiago October 24, 2012 (4 years ago)

    I could not understand something. How do I activate the Slippage automatically work with actual market values?Even more!

    • #28 written by birt October 24, 2012 (4 years ago)

      What actual market values? There is no way to determine what slippage you are getting (other than sending a lot of orders, logging and aggregating the data).

      • #29 written by Thiago October 24, 2012 (4 years ago)

        So how do you recommend using the Slippage for staying at a value closest to reality?

        • #30 written by birt October 24, 2012 (4 years ago)

          You log the slippage for many trades with your live broker and you run some averages, you find the min/max etc.

  • #31 written by Peter February 5, 2013 (3 years ago)

    I really like the slippage feature. However one thing I have not yet managed to do is the following:

    1. when entering the market with stop orders you usually get negative slippage
    2. when exiting the market with a hard sl you usually get negative slippage
    3. when exiting the market with a hard tp you usually get negative slippage

    Is there any way to reflect this behaviour in the settings? As far as I understood you can only set the odds for all types of orders right? In reality you are much more likely to get negative slippage with a hard sl than a hard tp.

    • #32 written by birt February 6, 2013 (3 years ago)

      I’m afraid you are correct: you cannot individually change the odds for each order type.

      • #33 written by Peter February 7, 2013 (3 years ago)

        maybve in a future version? πŸ˜‰

  • #34 written by Peter February 5, 2013 (3 years ago)


    3. when exiting the market with a hard tp you usually get POSITIVE slippage

  • #35 written by Peter February 23, 2013 (3 years ago)

    Hi, why i get in Report only a 50.54% of Quality and not 99% ? I test on daily candles

    • #36 written by birt February 25, 2013 (3 years ago)

      If you’re not getting 99%, it means you are not using tick data in your backtest. Make sure that you created an FXT for the D1 timeframe and that it’s in your history/broker folder. Note that right now you probably have an FXT there created by MT4 so you will have to delete that one and replace it with the tick data FXT.

  • #37 written by Andy February 23, 2013 (3 years ago)

    Hi Birt, I have a problem with TDS. When I start a backtest, start it takes a long time (3-5 min) and is not a machine problem. I have it in the latest version (today). Know you can beit?

    • #38 written by birt February 25, 2013 (3 years ago)

      Things to check:
      1. Did you change the backtest starting delay in the Configuration tool? If yes, set it to 0 and retry the backtest.
      2. If the above doesn’t fix it, does starting the backtest take a long time even for a different EA, for instance the MACD EA?

  • #39 written by Marcel April 3, 2013 (3 years ago)

    Hi Birt,

    I am using the Tick Data Suite and downloaded and converted a lot of tick data and all went fine. Now I have installed a new MT4 terminal of another broker and went to the whole process again (installed the TDS.exe file, converted the csv-files into fxt- and hst-files and moved them to the right directories) but if I want to run a backtest of i.e 2010 up till now, it’s showing me the message that there is no data, but if I start the backtest at the beginning of 1984 is running smoothly, showing trade dates in 1984. So I guess something went wrong with the date conversion/processing. Do you know how I can solve this issue?

    Kind Regards,

    (I posted this question already in one of the other sections but I thought this page/section is more relevant)

  • #41 written by _robo_ April 13, 2013 (3 years ago)

    is okay if i use tickstory lite to download and create a file hst also fxt. then use tds to do backtest?

    thank you very much,

    • #42 written by birt April 17, 2013 (3 years ago)

      Yeah, it seems to be quite ok other than the fact that MT4 will delete your FXT files in a couple of days because TickStory doesn’t set them readonly. At least that was the only complaint I heard so far and naturally I can’t vouch for the FXTs created by TickStory.

  • #43 written by Jon January 23, 2014 (2 years ago)

    1) can we add in latency for order fills? This is a little different from slippage. We can actually randomize (with minimum and maxmimum values) the length of time between the opening/closing price at time of request vs the price of the actual fill. I think this would be more accurate for some strategies than trying to manipulate the slippage artificially.

    Slippage is caused mainly by the difference between when the price at order request and when it was filled.

    2) can we add latency between back-to-back orders as they are being opened/closed? There are times where I do a closeAll, and I don’t want all 10 orders closing in the same second. I might want to close 1-3 per second.

    3) Is it possible to only enable slippage for orders when they are opened and no when they are closed. Or when they are closing, but not when they are opened?

    • #44 written by birt January 24, 2014 (2 years ago)

      1. I know and it would make a lot of sense, but I’m afraid it’s not possible due to limitations in the MT4 backtest engine.

      2. Same as above.

      3. No, it isn’t.

  • #45 written by jivetrader March 11, 2014 (2 years ago)

    hi birt, if i have configured TDS for 1 tick of slippage and my EA does not have a parameter for slippage (like the sample MACD EA), i should get error 138, correct?

    if so the remedy would be either 1. reprogram slippage into the EA, 2. reconfig TDS for no slippage. is there some other way to account for slippage in the Strat Tester itself or something?

    • #46 written by birt March 12, 2014 (2 years ago)

      All EAs must supply a slippage figure with their trade requests. Just because you can’t configure it, doesn’t mean it’s not there. Your EA probably has a hardcoded value. Now, if this value is higher than the value you configured for slippage, you will have no problem; however, if it’s lower, you will get a lot of error 138.

      And yes, the solutions are as you mentioned, except that if the EA already submits a generous slippage figure you might not have a problem at all. Just check for error 138 in the backtesting log.

  • #47 written by jivetrader April 2, 2014 (2 years ago)

    i am still having trouble with slippage. our homemade EAs don’t seem to have a parameter for this. can you provide some code or web resources or something to help? thanks.

    • #48 written by birt April 2, 2014 (2 years ago)

      Please see the slippage parameter at

      • #49 written by jivetrader April 5, 2014 (2 years ago)

        birt, my TDS slippage settings are 1.0 and 1.0.

        my EA OrderSend() slippage = 2

        i am getting a fair number of Error 138’s.

        system is Win7-64, MT4 v610
        please advise. thanks

        • #50 written by birt April 5, 2014 (2 years ago)

          You need to use slippage 20 instead of 2 if your broker is using five digits and you meant to have up to 2 pips slippage.

  • #51 written by Alex du Plooy January 25, 2015 (1 year ago)

    Love the software – has resolved most of my Strategy Tester problems.

    When testing over a weekend is it possible to test using fixed spreads – How do I do that. I have tried specifying the spreads in the Strategy Tester but running 2 tests with different spreads give the same results.

    • #52 written by birt January 27, 2015 (1 year ago)

      The spread is configured when creating the FXT with CSV2FXT. Simply type the desired spread in the Spread field and that’s going to be the spread for your FXT no matter if you test during the week or during the weekend and no matter what you specify in the strategy tester.

      If you wish to change the spread without recreating the FXT, you will have to use a hexeditor, see the FAQ for more information.

    • #53 written by birt January 27, 2015 (1 year ago)

      Forgot to mention that if you wish you can use the variable spread stored in your CSV. However, once you created an FXT with variable spread it is no longer possible to easily affect the spread in any way.

  • #54 written by Jon January 25, 2015 (1 year ago)

    What prevents TDS from creating a similar product for mt5? As long as fxt file can be generated, it should be possible, correct?

    • #55 written by birt January 27, 2015 (1 year ago)

      Last time I checked MT5 wasn’t creating FXT files, it was dynamically generating interpolated ticks from bars. Granted, this was a long time ago so things might have changed.

      The actual problem is not this, though; it’s the fact that it is still largely unpopular despite being here for quite a few years. Long story short, it is not really worth the time.

      • #56 written by Crofty April 5, 2016 (6 months ago)

        I would love to use MT5 as it has a number of nice features, but there’s no way I would use it without being able to test real tick data! Its all on you Birt πŸ˜‰

        • #57 written by birt April 6, 2016 (6 months ago)

          Not going to happen anytime soon, sorry. I currently have no plans to make an MT5 version of TDS.

  • #58 written by Ben Reynolds March 5, 2015 (1 year ago)

    Hello Birt, So I have been using the tick data suite and was originally just using tickstory lite to transfer and convert the data. For some reason or another I cannot get it to work that way anymore. So now I’m trying SQ tick data downloader but I cannot get your scripts to find my csv file and in the troubleshooting section it only says how to fix it for windows 7. I have windows 8.1 so would you happen to know what I should do? Sorry man, I’ve been trying to fix the issue but I’m not having any luck.

    Thanks and any help would be greatly appreciated!


    • #59 written by birt March 5, 2015 (1 year ago)

      Just for reference, sending me an email usually results in a faster response time than posting here.

      Your problem is most likely that you’re not putting the CSV in the correct folder. In MT4, go to File -> Open Data Folder and in there put the CSV into MQL4/Files.

      If you experience further problems, please drop me an email and copy/paste the relevant lines from your experts log.

    • #60 written by Jon March 6, 2015 (1 year ago)

      This article covers how to use the csv2fxt scripts to convert tick data, including the correct folders to place everything in.

      As a side comment, I use SQ TDD to download the data from dukascopy, and then I use tickstory to generate the csv files, usually in groups of 3-5 symbols at a time, with tickstory lite, you can specify the output folder and customize the name of the output file. So I drop the csv files directly into one terminal that is dedicated to creating fxt files for backtesting. IC Markets is a good broker that has all of the FX and major CFD symbols. IamFX is another one. csv2fxt should detect the symbol correctly. Global Prime Au is good just for FX. You have all of the 1-min charts open and save that profile. Each time you open that mt4, all you have to do is drag the csv2fxt script onto the charts. Always generate one less than the total amount of charts simultaneously. So if you have 4 cores, then only process max 3 fxts at once (each will use 1 processor).

      I then copy the generated fxt files to a separate mt4 (same broker) launched with TDS and do 100% of the backtesting there.

  • #61 written by Fabio March 27, 2015 (1 year ago)

    Hi Birt,
    i’ve dowloaded all cross and create FXT and HST file in a different folder from origin (in a big size disk); so, i’ve copied TDS in right folder and change start string with “/portable”, but when start MT4, after one minute, message me with stop running and close application.

    some idea ?


    • #62 written by birt March 27, 2015 (1 year ago)

      Is this folder on a network drive? MT4 has huge problems running in /portable mode from a network drive. In any case, I would advise trying to run MT4 from the same folder with the /portable switch but without the TDS and see what happens. Also try to run with TDS but without /portable, see what happens in that case.

      Anyway, if that’s the issue, I suggest using your regular system drive, getting rid of the /portable switch and simply setting up a junction for the tester/history folder to the big drive. If you don’t know how, google NTFS junctions and use something like the sysinternals junction tool.

      • #63 written by Fabio March 28, 2015 (1 year ago)

        Thanks Birt.
        No network drive, is internal in my desktop without network.
        If i lunch MT4 with original exe in portable mode seems ok, but crash application when i activate tester strategy. If i lunch TDS without portable, it doesn’t find indicators and configuration and create all folder in system disk.

        I’ll try with junction…see you soon.

  • #64 written by Jason Smith July 9, 2015 (1 year ago)

    Great product Birt,

    Should I be selecting “current” for spread when backtesting, or will TDS use the actual bid/ask spread with any setting?

    Also, MT4 seems to hang for anywhere from 5-10 minutes after hitting start. Journal only shows “Actual tick file “d;/xxxxx” found”. Eventually , orders will begin to scroll up and the test will complete. It’s a core i7 PC w/ 16gb ram, so I don’t think my PC is the issue.


    • #65 written by birt July 9, 2015 (1 year ago)

      TDS will only use the actual bid/ask spread from the CSV if you select the “Use real spread” option when converting via CSV2FXT. Otherwise, selecting Current in that dropdown will use the current spread whereas typing a number will use that many pip fractions (e.g. on a 5 digit broker, typing 10 will result in 1 pip spread).

      Regarding MT4 doing nothing for 5 minutes, could you try a different EA? For instance, the MACD EA. The delay is definitely not normal. Also, ensure that you didn’t select a start date that would make MT4 skip through the file until it reaches it.

  • #66 written by Adrian Finn August 5, 2015 (1 year ago)

    Hi Birt,

    What does it mean when you get an ordersend error 138 whilst doing a backtest with TDS enabled but without the slippage simulation settings turned on?

    My tests keep stalling with an error message printed to the log saying ‘waiting for next tick’, but that tick never comes.

    My coder is saying it’s a problem with my data, that the price jump from one tick to the next tick is so large (4.8 pips) that it causes the error, and that nothing can be done in the code to fix it.

    Have you seen this before?

    Kind regards,


    • #67 written by birt August 5, 2015 (1 year ago)

      You shouldn’t get error 138 if slippage is turned off. No idea why that happens. If you didn’t sort it out already, email me some 20 lines from your backtesting log before and after the error.

      A price jump of 4.8 pips from a tick to the next is something that happens quite often, on some brokers pretty much every time there are important news (e.g. non-farm payroll). If your EA gets stuck on such situations, it’s… let’s just say it’s not ideal. I don’t want to accuse anyone of poor programming, but clearly your EA has some problems. I’d advise backtesting some other EA such as the MACD EA on the same data to see if it works fine.

  • #68 written by Ash September 24, 2015 (1 year ago)

    Newbie to backtesting and ea’s in general, and a bit of a strange question:

    Trying to run mt4 in portable mode due to data size issues.

    When I launch mt4 via TDS via TickStory, portable mode is launched.

    But when I go into my mt4 folder, and launch mt4 via TDS, it keeps going to the non-portable mode.

    I feel like there’s an obvious solution to this? Please help πŸ™‚

    (Also – is it necessary/better to keep launching via TickStory when I’ve got TDS?)

    • #69 written by birt September 24, 2015 (1 year ago)

      You don’t need to launch via TickStory.

      To launch MT4 in portable mode via TDS simply add /portable to the shortcut (or in command line if that’s how you start it). Any parameters that you pass to TDS get passed to MT4.

  • #70 written by Ash September 24, 2015 (1 year ago)

    It worked! Thank you – I added /portable to the TDS shortcut and it opened MT4 in portable mode. Really appreciate the super-duper quick reply! πŸ™‚

  • #71 written by Peal October 24, 2016 (2 days ago)

    BIRT, I need your help, please, I’ve carefully read all the info in your site and followed the instructions but cannot get the backtest with variable spread to work.

    Let me explain the two scenarios:
    –Method 1–
    I’ve downloaded tick data with a free aplication Tick Downloader and exported it to a csv file, then generated the FXT with your CSV2FXT scritp. I made a MT4 backtest and got really different results that with metaquotes data, the FXT did not get overwrited, so I assume tick data worked. So far so good. I regenerated the FXT with real ‘variable’ spread setting and did some backtesting and it seems MT4 takes the fixed spread value of the tester, it reacts to that value no matter what.

    –Method 2–
    I’ve installed Tick Data Suite trial with no problem. For what I see in MT4 logs, it integrates with MT4 as a plugin, and shows a new setting in the tester: ‘use tick data’. Then I used Tick Data Manager to download EURUSD history and for my surprice it seems that it is not using the FXT file, it reads the downloaded data directly. So nice, BUT again the backtesting shows that metatrader takes the fixed spread value in the tester, and depends on it.

    I really appreciate it if you could help me.
    How do I know if variable spread values are used?
    Thank you in advance

    • #72 written by birt October 24, 2016 (2 days ago)

      Like Jon said, make an EA that prints the spread on the chart and backtest it in visual mode. With TDS v2.1.3, all spread fetching methods should work – Ask-Bid, MarketInfo, SymbolInfoInteger. Also, with TDS2 at the end of the backtest it will say Spread: Variable in the report.

      Naturally, you must enable the variable spread checkbox in the Tick data settings dialog for variable spread to work.

      If you want an EA that prints the spread, I have a ready-made one, please open a support ticket and I will send it to you.

  • #73 written by Jon October 24, 2016 (2 days ago)

    In the onTick section, you can print in log and/or on screen (Ask – Bid). I dont have the exact function on hand but i remember you must get the values using onTick so that it recalculates every tick.

    Then in log or on-screen you run a [visual] backtest and verify the spread changes.

  • 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