User Tools

Site Tools


frequently_asked_questions

Frequently Asked Questions

Installation

Exporting to File

Exporting to Metatrader

Metatrader, Back-testing & Expert Advisors

Common Metatrader Errors

Need further assistance?

Please join our online Support Forum for further discussion and assistance. Don't forget that you can search the forum for common errors or questions (eg. “DAX” or “cannot open”). The forum is an invaluable and quick resource to answering common questions.


Windows 7 .NET installation fails with 'Invalid certificate' or other reason

Please ensure you that you have Microsoft updates KB4474419 and KB4490628 installed on your system. Reboot your PC and attempt to re-install .NET 4.8 again.

I am getting an error 'Export failed: Access to the path xxx denied'

This error occurs when you try to export to a protected folder location (such as C:\Program files). To rectify, specify a location in a writable folder such as in your Documents folder (for example: C:\Users\MyUserName\Documents\{Symbol}.csv).

I am getting a launcher error when starting MT4.

If this error occurs, check the following:

  1. If you have a license code, apply the license in the HelpLicense menu.
  2. Ensure you have set your MT4 Installation folder correctly in FileSettingsMT4 Settings. It should appear something like C:\Program Files (x86)\Metatrader and the nominated folder should contain the main Metatrader executable terminal.exe.
  3. If you are using Windows 7 or are receiving a prompt for administrator access when you launch, run Tickstory as Administrator by right-clicking the icon and selecting “Run As Administrator”.
  4. On slower machines, it may take some time for time for MT4 to to load. In this case, Tickstory does not wait any longer and puts up this error. Once MT4 has finished starting, you can press the launch button again and it should no longer display this error.
Note: Please make sure you have updated to the most recent version of Tickstory to ensure your Metatrader 4 Build version is supported. In the event Tickstory does not currently support the most recent MT4 version, you will need to roll-back your terminal to the last supported version until an update is available (as advised by our Support team).
If you continue to have difficulties, make sure you uninstall any third-party software that augments or alters Metatrader behavior as it may be incompatible with Tickstory.

I am not getting 99.9% modelling quality on my back-tests or;

My MT4 back-test reports that the modeling quality is "N/A" or;

My MT4 back-test reports "TestGenerator: internal error because file not opened"

This problem is typically due MT4 not utilising your exported data correctly. Check the following:

  • Ensure you have launched your MT4 terminal via the Tickstory 'Launch MT4' option (press F8 when in Tickstory to do this).
  • Ensure you have selected the “Every tick” modelling method in the Metatrader 4 Strategy Tester.
  • Ensure you have exported your MT4 database to the correct location (make sure you have selected the correct server if there are multiple selections). For example, if you have a “Demo” and “Real” account, make sure you are exporting to the same one you are using for back-testing, otherwise the data will not be visible to MT4.
  • If applicable, ensure you have correctly mapped the Tickstory symbol name (eg. EURUSD) to the MT4 equivalent symbol name (eg. EURUSDm, fcmEURUSD, etc). (More help is also available in our forum).

Why isn't TickstoryInfoExpert EA generating config file?

Firstly, check you are checking the correct location. In MT4, go to FileOpen Data Folder and then browse to the <Data Folder>/MQL4/Files folder. A file should exist with a *.mt4config extension. If it does not, check the 'Experts' tab to see if any errors are being generated. This problem is sometimes caused by an invalid filename being generated (since it utilises your broker's name). You can force a valid filename by going to the EA's '*ConfigFileName*' parameter to “Broker.mt4config”.


I am getting the error "Access to the path denied" when exporting.

This is caused by Windows denying Tickstory access to the folder where it needs to store its downloaded tick data. To resolve this, go to FileSettings and specify a “Dukascopy Store Folder” that has general write permissions. For example, create a folder called “Tickdata” in your Documents and then specify C:\User\<YourName>\Documents\Tickdata as the storage folder location.


My back-test doesn't complete fully and stops at a certain date.

This is usually caused by a limitation with MT4 which only supports a maximum of 4GB of data. If your back-test period is greater than 2 years, you are likely to come across this limitation. To check for sure, have a look at the size of your FXT files and ensure they are under 4GB.

You can reduce the size of your data export by:

  • Minimising the date range you are testing. You can, for example, keep a set of MT4 terminals each with a set of 2 years of data. (This will also assist you with keeping out-of-sample data when optimising your Expert Advisor).
  • When exporting, check the “Filter duplicate ticks” option.

Further discussion on our forum can be found here.


How does Tickstory by-pass Metatrader's 1-minute data limitation so it can use tick data?

MT4's historical data does have a minimum granularity of 1 minute which means that if you are using your broker's data, then yes, you are only going to get tests on interpolated points within each of these one-minute bars (for example, the Open, High, Low & Close is taken, resulting in 4 data points). To process these generated points (or “modelling types” as MT4 refers to them), MT4 creates an (FXT) data file which contains these individual “ticks”. It then proceeds to back-test on this data. Modelling types can be 'Every tick' (every tick that was downloaded from the broker while your terminal was connected), 'Control Points' (OHLC of the bar - 4 data points) or 'Open prices' (The open price of the bar - 1 data point).

In the case of Tickstory, it bypasses MT4's generation of the data file and instead produces it's own 'Every tick' model data file with tick-by-tick data. That is, rather than having merely a few data points that occurred within that minute, it will have all the actual ticks that occurred. The MT4 back-tester will then process this data as usual.


Is there any value in back-testing? What is the advantage of using tick data?

The value in back-testing is the ability to evaluate a strategy to-a-point. You have probably heard the phrase “past results do not guarantee future results” and this is the case for back-testing. The best you can do is understand your strategy and the variables involved so you have some confidence it can handle various market conditions, brokers, etc. Once you have done this, you are still not guaranteed to get the results you see on your back-test report - you will then need to go through a period of forward-testing on your chosen broker where you will find various other variables that cannot easily be simulated (trading lag, price discrepancies, slippage, etc). Then, when you finally are confident enough to go live with it, you are still likely to see some discrepancies between your simulated results versus live. This doesn't mean that back-testing has no value. The process of testing your strategy is a matter of prudence to ensure you are not merely gambling that your strategy will work as you hope. When you work with tick data, this is just another tool to help you more accurately simulate market conditions (especially for scalping strategies).


What are the limitations back-testing with tick data?

Remember that tick-data back-testing is just a tool to help you understand your trading strategy more comprehensively. It does not simulate the real-life situations you will encounter when you begin to trade live.

Here are some factors to consider when trying to evaluate your EA's performance for trading in a live market:

  • Is your strategy reliant on spread? If so, test with varying spread values to make sure the back-test results aren't adversely impacted by small changes to the spread.
  • If you are testing a High-Frequency Trading Strategy, does your broker's data feed match with your test data? If they are markedly different, expect markedly different results since small differences can affect your profitability. A period of forward-testing will help you determine these differences. You can also help mitigate these differences by ensuring your EA performs consistently across different broker's test data.
  • Slippage - The MT4 Strategy Tester does not factor in slippage into its simulation. Forward-testing your EA will give you a better idea of how this affects your results.
  • What is your ping to the broker's server? Remember that back-testing assumes a ping of 0 milliseconds where this is not reasonable in reality. If you have a HFT trading strategy, your should code assume some delay when placing your trades in the back-tester. When selecting a Broker's server, choose one that is geographically closest to you or has the lowest ping.
  • How frequently does your EA trade? The back-test results of longer term strategies (for example, those that implement a buy and hold over a week+) are less affected by variables such as slippage and lag. This means you are much more likely to get a more accurate simulation than for a strategy that day trades or trades very often.

Why is my EA not trading? Or, Why isn't my EA doing X?

The reasons for an EA not trading, not trading as expected, giving errors or spurious results can be endless - such is the nature of a computer program. Given the complexity and time-consuming nature of trouble-shooting these sort of problems, we unfortunately cannot provide support in these circumstances (as much as we'd like to). Instead, below is a general guide which is intended to assist you trouble-shooting your EA problems.

An EA may not enter a trade for numerous reasons, depending of course on what entry criteria it uses and whether any errors are occurring while attempting to enter a trade. Quite commonly, EAs are dependent on the current spread of the market. If it's too high, the EA will refrain from trading. In most EAs, the spread limit is a configurable parameter and you can try adjusting this value to a higher threshold, just to see if this encourages the EA to open a trade. Other reasons for an EA not entering a trade can often be found by analysing the tester's “Journal” tab which often contain informational messages and may be reporting error numbers during the EA's operation. These error numbers can be Googled to find out more about the nature of the problem.

Common errors are:

Order Send Error 131 (ERR_INVALID_TRADE_VOLUME) - This usually indicates that the lot size that the EA has specified is incorrect. Check the 'Lot step' parameter you have set in Tickstory when you exported your data. If the lot size that your EA is using is not a multiple of this number, you will get this error and need to modify your EA so it correctly “normalises” the order volume so it conforms. In some EAs, there is a “Lot size” parameter which can be set. In this case, make sure that your lot-size is a multiple of the “lot step” parameter.

Order Send Error 134 (ERR_NOT_ENOUGH_MONEY) - This one means that your account cannot open the requested trade due to lack of money. You can adjust your initial deposit settings in MT4 Strategy Tester to supply your EA with additional funds for the back-test (or you can try lowering any parameters in your EA that deal with risk or lot-size).

Order Send Error 129 (ERR_INVALID_PRICE) - This can occur when your EA tries to enter a trade at a certain price, but the market price has since changed. In this case, putting a “RefreshRates()” call in your EA just prior to entering a trade can resolve this problem.

Zero-divide error - This error can occur if the EA is trying to use a particular parameter (Lot size, for example) and the value is zero. Just review your EA for where this error is occuring. Once you have established which specific parameter is zero, ensure that you have correctly exported this value in your Tickstory “MT4 Settings”.

Here is a general check-list to help resolve issues:

  • Ensure you have correctly exported your broker MT4 settings - or you can temporarily use the default settings provided to get you up-and-running. If you have incorrectly specified the “Lot size” (for example), then could cause problems with your EA trying to enter a new trade.
  • If your EA is not trading, try tweaking your “spread” threshold parameter to a higher value to see if that helps. There may be other such EA parameters that are preventing or filtering trades which you might also be causing your problem. You can revert all your settings back to default once you have identified the problem.
  • Check the 'Journal' tab to see if the EA is reporting any important information or errors. Sometimes EAs provide a parameter to turn on more detailed logging so you can locate the issue. If any errors are occurring, you will need to do a Google search or ask the author of the EA to assist you.
  • If know are writing your own EA, put logging entries in your code to determine at which point the EA is not trading or failing to trade.

Why is my trading system behaving differently when using Tickstory data (as opposed to MT4 broker data)?

The nature of tick-quality back-testing means that you are highly likely to get markedly different results between Tickstory and your broker data. This is especially true if your EA is a “scalper” that is sensitive to small price movements. Just remember that the most granular information MT4 brokers offer you is 1-minute data. In this one minute, numerous tick prices would have normally come through to your EA in a live trading environment. With Tickstory data, this information is more accurately simulated, potentially causing your EA to behave quite differently. For longer-term strategies, these differences should be not as pronounced, however for a short-term scalper strategy, this can mean the difference between success and failure! This is why tick back-testing can be much more revealing and valuable in assessing the viability of your strategy.


I believe there's a bug in Tickstory because my EA is not working as I expect.

Just remember that Tickstory only exports data - it does not perform any back-tests, calculations or the like. There are essentially 4 places where you should look when attempting to debug your issue (in order of priority):

  1. Bug in the EA: Ensure your code is not being subject to some sort of bug that is causing your trading issue. Place plenty of log entries in the code to see where the issue may lie. You should also utilise the “Visual mode” of the strategy tester which may give some hints as to why your EA is entering or not entering a trade.
  2. Check your MT4 Settings: Ensure you have exported the correct “MT4 Settings” for the symbol you have exported. Make sure, for example, that the 'Lot size' property has been set correctly.
  3. Known MT4 issue: In some cases there are known issues with the Strategy Tester. The Tickstory & MT4 forums are often a good place to read about issues that people have come across. Examples of such issues include the “4GB FXT limtation” which limits the maximum period you can test in the Strategy Tester at one time. Other similar issues do exist, and often will have some workaround which will allow you to continue your back-testing with this issue in mind.
  4. Bug in Tickstory: In the event you believe there is an issue with Tickstory, the implication is that Tickstory has exported incorrect data in some way. For example, perhaps you believe the “Open” price of a bar is incorrect. In this event, please clearly demonstrate this with screenshots of the charts and/or Historical Data Center so we can investigate further. Please do not just provide us with a copy of your EA and ask us “What's wrong?”, as we are unlikely to be able to assist since understanding your code and further debugging could take many hours of our time. Instead, distill as much information as you can that allows us to work with the data itself. If, for example, your moving average indicator is giving you the incorrect value, this should easily be demonstrable by showing the incorrect data points versus what they should be. This sort of targeted information is invaluable for us to investigate and identify any issues as soon as possible.

FXT - Cannot open error [5]

If this error occurs, please check the following:

  1. Make sure you have the correct MT4 Settings in your FXT file by using the method described here. This includes making sure that your “Map to” symbol is *exactly* as it appears in MT4 - including the correct case.
  2. Make sure you have exported more than 100 bars for the time-frame you are working in. For example, if you are working in the daily time-frame, export more than 100 days of data. If you are using the 1 hour time-frame, make sure you have exported at least 100 hours worth of data (i.e. 5+ days) and so forth.
  3. While trouble-shooting this error, make sure you don't have more than 4GB FXT files (you may try go beyond this once you have resolved the issue, but do note that MT4 does not always handle > 4GB FXTs very well).
  4. An invalid field somewhere such as a comma instead of a decimal place. See here for more discussion on this.

For more discussion on this error, please see our support forum.

frequently_asked_questions.txt · Last modified: 2024/08/28 12:09 by tickstory