On arriving to this guide, it's assumed that you already downloaded the desired tick data and it was converted to an FXT file and several HST files, each of which is setting in its proper place. If the steps above were not done yet, you will need first to follow the How to download free tick data and the How to prepare the tick data for Metatrader 4 guides.
As a begin, the Tick Data Suite installer has to be used, you can find it on the tick data downloads page. After installation is complete, the Configuration tool will be run automatically; this is a good chance to install the Tick Data Suite in the desired Metatrader 4 folders for use with by clicking the Select Path button, browsing to that path and finally press the Copy TDS button, this will then result in the Tick Data Suite activated with the desired terminal and a prompt about adding an icon on the desktop will appear for easing the access.
On the Tick Data Suite installation complete, to start it just launch Metatrader 4 by the desktop icon or simply double click tds.exe in the Metatrader 4 folder. It will start your Metatrader 4 terminal with all the features enabled; the 2 GB limitation will no longer exists, FXT files will not be overwritten, variable spread FXT files will get automatically detected and tick data backtests and optimizations will work if tick data FXT files are being used.
Multiple Metatrader 4 installations
If the Tick Data Suite would be used with a different Metatrader 4 terminal in a later time, TDS Configuration program would have to be executed, it can be found in the Tick Data Suite Start Menu Programs folder, then the previous steps would have to be repeated; the desired Metatrader 4 terminal path is selected then TDS is copied. Once this is done, to run the new selected Metatrader 4 terminal with tick data operation enabled, the desktop shortcut icon can be used - if you choose to add one - or tds.exe in its folder can be double clicked.
The Tick Data Suite allows simulating slippage in backtests since v1.1.9b came out. The slippage configuration is not an easy part of this guide. It can be located in the TDS Configuration tool, navigate to Start -> All Programs -> Tick Data Suite.
It's important to know that slippage can be totally disabled or enabled through th "Enable slippage features" checkbox, it's disabled by default.
The next so important to know is that the slippage parameter sent with the OrderSend() calls in the expert advisor matters. If the EA slippage parameter isn't equal or larger than that configured in the Tick Data Suite, an OrderSend error 138 errors will be in the backtest; error 138 is requote. The slippage is totally randomized based on the current tick price, so repeating the order following such a requote error will result in a different slippage value. So, if a too small slippage value is being used by the EA for that configured in the Tick Data Suite while also using an order retry loop, it will finally get an accepted slippage, which will be within the EA configured value, not that configured in the Tick Data Suite. Artlessly if slippage is enabled, the EA slippage value have to be larger than the highest slippage value configured in the Tick Data Suite.
A special behavior involves pending orders (stop & limit) and SL and TP hits; for which the EA requested slippage is totally disregarded; in other words, the slippage requested through OrderClose() is always esteemed while that requested through OrderSend() is just acknowledged for market orders.
Do not overlook too that the slippage value passed to OrderSend is in points - not pips - so a 10 value for maximum allowed slippage of 1.0 pips has to be used for a broker with 5 digits.
Third in importance, The backtesting journal will log all the slippage, so it can give you an idea about how much slippage each order has received.
If the Tick Data Suite is being used with a 4 digit broker, although it's highly not recommended as in this condition the 5th digit precision coming with nearly all tick data is lost, the slippage is rounded to the closest integer value; as an instance, a 1.5 pips slippage will be of 2 pips and that of 1.4 pips will be a 1 pip slippage.
Before going into the actual settings, one last important thing should be known, it's that the Metatrader 4 terminal doesn't need to be restarted for the updated slippage settings to take effect. All what is needed is to start a new backtest, then the settings will take effect at once, while they will not be applied on a progressing backtest, it has to be stopped then restarted to undergo the new updated slippage settings.
The actual slippage configuration
Max favorable slippage and Max unfavorable slippage are the slippage range settings, they determine how much slippage can be experienced in the backtest by orders. If the Max favorable slippage is set to 1.0 and Max unfavorable slippage to 1.5, the slippage might be positive between 0 and 1.0 pips or negative between 0 and 1.5 pips, a positive (favorable) is that favors the EA being backtested; in essence a better price, meaning a price that is below the running Ask quote in a long order or a price above the current Bid quote in a short order. On the other hand negative (unfavorable) slippage is that results in a deficit by the running that EA; a higher price for the long orders and a lower price for the short orders.
The Custom % chance to slip setting determines what percentage of the orders would undergo slippage. If it was set to 50, a half of the orders will undergo 0 pips slippage, while if set to 75, a quarter of the orders will undergo 0 pips slippage. As a rule, other orders are still possible to end up with a slippage of 0 pips leading to a slight increase in the final percent of orders with 0 slippage, depending on the max slippage values configured. In sum, in the last instance, 75% of the orders slippage will be normally calculated, while the other 25% will be completely skipped. This setting is disabled by default which means that the slippage range is between 0 and MAX, so that all the orders will have slippage and some of them might have a slippage of 0 pips.
Custom % favorable odds setting if enabled, it will change the slippage behavior in a considerable manner:
- It's disabled by default, if left as is, slippage will be calculated randomly as a number falling between -MAX_UNFAVORABLE_SLIPPAGE and MAX_FAVORABLE_SLIPPAGE. So if Max favorable slippage is set to 1.0 and Max unfavorable slippage is set to 3.0, slippage will fall in the range of -3.0 to 1.0, with an equal chance for each value to appear, for instance -1.5 will appear as often as about as 0.7, in conclusion, with a given range -3.0 to 1.0, negative slippage will have a 75% chance to appear while positive slippage will have a 25% chance. Another example, if Max favorable slippage was set o 1.0 and Max unfavorable slippage to 1.0 the slippage range will be of -1.0 to 1.0 with a 50% chance for positive slippage to show up.
- If enabled , it'll determine how many of the trades with slippage will have positive slippage.
If was set to 50, Max favorable slippage to 1.0 and Max unfavorable slippage to 3.0, this will mean that there will be a positive slippage between 0.0 and 1.0 for 50% of the orders with slippage, while the other 50% will have a slippage between -0.0 and -3.0.
If was set to 25, 2.0 for Max favorable slippage and 2.0 for Max unfavorable slippage, 25% of the orders with slippage will have favorable slippage between 0.0 and 2.0 and unfavorable slippage between -0.0 and -2.0 for the other 75%.
It's so impotant to note that the Custom % chance to slip is a dominant setting affecting the resolved percentages resulting from other settings. If Custom % chance to slip was set to 80 and Custom % favorable odds to 50, the net result will be slippage for only 80% of the trades, 50% of which (40% of total) will have positive slippage while the rest 50% (40% of total too) will have negative slippage.
The main target of the Custom % chance to slip and Custom % favorable odds is fine tuning. If there is no a strong motive, just leave them disabled as by default and modify the Max favorable slippage and Max unfavorable slippage settings.
The other slippage settings don't need any further explanation.
Limit orders have slippage determines if the pending limit orders - buy limit and sell limit - would undergo slippage if it was set.
In the same way, Stop orders have slippage determines if the pending stop orders - buy stop and sell stop - would undergo slippage if it was applied.
The Auto-closed orders (SL, TP) have slippage as it's clear, refers to the Stop Loss and Take Profit orders, if enabled, will put the position SL and TP closings under slippage, including closed orders at stop; either the backtest end or a stop out.
Eventually, Slippage during optimizations allows slippage enabling or disabling while optimizations are running. It's strongly recommended to let it disabled as by default as with slippage randomization, different results with the same parameters will come out, leading to optimization results potential ignoring, otherwise they might be promising.
3rd party software
Tick Data Suite can be used with 3rd party products assuming that they have to open terminal.exe. If such a product is involved, the original terminal.exe has to be renamed either to:
then tds.exe has to be renamed to terminal.exe. Any 3rd party product should work without problems if the command line parameters were performed smoothly. The Walk Forward Analyzer author was decent enough to add a simple checkbox allowing the use of the Tick Data Suite even without the need to rename.
Possible problems with 3rd party software
Some EAs necessitate a connection to the broker even if running in a backtest, Wallstreet Forex Robot and FAP Turbo are among them. Auto backtesting and optimization 3rd party tools might cause some problems if used with those EAs. This condition is due to the too fast start of the backtest or optimization since the data is already there. An indicator for such an issue occurrence is if the EA works fine with a 3rd party tool with history center data, while refusing to trade using tick data; this is typical with EAs authenticating the account number with their server. This can be solved by increasing the backtest start delay through the Configuration program; just to be set to around 3, this should be well.