Beginner questions - Setting up MT4 for back-testing

Report any bugs with the Tickstory Lite software here. Please give as much detail as possible so the issue can be identified and resolved as soon as possible.
billworld
Posts: 13
Joined: Mon Mar 07, 2016 1:59 am

Beginner questions - Setting up MT4 for back-testing

Post by billworld »

I purchased Tickstory several months ago for the express purpose of editing FXT files—specifically to keep the lotsetp at .01 even when running tests offline. Couldn't get it working at the time even with assistance from TS support and I had to stop spending time on it and resort to my workaround described at viewtopic.php?f=2&t=984&p=4638#p4638. However, I now need to backtest with commissions included and need to get TS working for this. So, back at it and still having lots issues as noted below. I'm using 1.7.5 and it's not clear that I need to update to 1.8.5 and/or what that price is. Although, I'm hesitant to send any more money to TS until I get it to work as I have yet to successfully use the product. I used to own and operate a software company so I appreciate the challenge of software working properly in all scenarios. Just need some help getting it to work as documented and/or as not yet properly documented.

Issues:

1) Location of FXT files says <...tester/files> but screen shot highlights and shows different location, namely ...test/history
location of fxt files.png
2) Docs fail to mention that you won't see any FXT files there unless you first run the backtester

3) Launch MT4 (v1010) from Tickstory doesn't work and yields the following error.
MT4 launch issue.png
4) Docs fail to described what the Comm type and Comm Lots settings do and what values they accept.

5) What are the correct parameters for a situation where a broker such as FXCM charges $8 RT per standard lot? The following shows the default params from FXCM. What specifically needs to be changed?
Docs say one thing but show another
Docs say one thing but show another
6) I assume there's no way for the MT4 strategy tester to breakout and show the actual commission amount so I can confirm the TS adjusted FXT file is properly working?

7) After editing an FXT file's parameters, clicking save yields no response as to whether the file was or was not successfully saved. In my case I go to the file system to see if the date of the file was just updated for confirmation, which is unnecessarily klunky.

8) Changing the spread param has no effect. I understand that it's in there for backward compatibility, but, if it's not going to work for whatever version of associated apps one's using, the user should be made aware of this via a pop-up or simply just don't allow the spread param to be editable if unnecessary for the associated app.

9) No official support is offered for the launch MT4 feature from TS however isn't that required for the FXT edits to work? Otherwise MT4 overwrites said edits once the backtester is run. And if you lock (prevent editing) an FXT file in the file system backtester simply won't run for the affected timeframe.

10) Lastly, after installing FXCM MT4 fresh twice I'm unable to associated TS with it and get the following error when attempting to set the location params via settings. And yes, I did run MT4 first. Although it wasn't running with a demo or live account. Is that required? Is so, it should be noted. Here's the error I'm getting on the fresh installs. Actually I can't add any more attachments so I can't show the screenshot.


I've tried numerous attempts on existing installations as well as fresh installations. I'd really like to get all of this working.

tickstory
Posts: 4899
Joined: Sun Jan 06, 2013 12:27 am

Re: Beginner questions - Setting up MT4 for back-testing

Post by tickstory »

Hi Billworld,

In response to your questions:

1) The data folder can vary depending on your setup. Ensure that when you go to File->Open Data Folder in MT4 that this matches the same folder you see in Tickstory's File->Settings->MT4 Settings->MT4 Data Folder.
2) You will only see FXT files once you have exported data via Tickstory. Tickstory produces FXT files that contain tick data that MT4 can use for its back-test (as opposed to the standard MT4 behaviour which is to create its own FXT files which contains only 1-minute data).
3) You will need to either revert your MT4 back to a supported Build for Tickstory v1.7.5 (i.e. < Build 970) or you will need to upgrade to Tickstory v1.8.x to support MT4 Build 1010. If the former, you can find out instructions on how do this here: viewtopic.php?f=2&t=683. We obviously recommend working with the latest version, although we understand that you would like to ensure things work as you expect first.
4) From this post viewtopic.php?f=2&t=346&p=1960&hilit=commission:

Comm type: The base commission type - either Money (set to 0), pips (1) or percent (2).
Base comm: The commission value - this is the amount of Money (if Comm type is 0) or Pips (if Comm type is 1).
Comm lots: The commission charge type - can be Commission per Lot (0) or Commission per deal (1).

5) Use
Comm type = 0
Base comm = 8
Comm lots = 0
6) MT4 Strategy Tester does not explicitly display commission settings. If you would like to cross-check the exact settings of your broker (including commission, leverage, etc), then this method is currently recommended: viewtopic.php?f=2&t=809.
7) At the moment it only reports if there is an error.
8) MT4 has added a spread box in the Strategy Tester to facilitate changing the spread. For users that are using older versions of MT4, the spread settings are still functional.
9) This message was intended as a notification for users who expected the feature to be compatible with all future MT4 versions. We will be revising/clarifying this message in future.
10) A few screenshots with your settings etc would be useful here, but in their absence, you can perform this following workaround with a text-editor such as Notepad:
a) Close all instances of the Tickstory application.
b) Browse to the folder C:\Users\(yourname)\AppData\Roaming\Tickstory\Tickstory Lite
c) Make a copy of the TickstoryLite.config file as a backup just in case.
d) Open the file TickstoryLite.config in Notepad or other suitable text-editor.
e) Manually edit the following section:

Code: Select all

    <Mt4Settings Mt4InstallDir="C:\Program Files (x86)\Trading\MetaTrader 4"
        ServerName="MetaQuotes-Demo" BaseDataDir="C:\Users\Username\AppData\Roaming\MetaQuotes\Terminal\6EEBB62583078EAADA82642D886AAB7C"
        LaunchCmdLineArgs="" />
Set the MT4InstallDir parameter (between the quotes) to be the location of your MT4 installation folder and BaseDataDir parameter to be the location of the folder when you select File->Open Data Folder in MT4.
f) Save the file.
g) Start Tickstory. When you check the settings, everything should be as you specified.

If you are trying to get things going, please focus on points 3) and 10) first as they are the most important to ensure a correct configuration. Once you get 99.9% modelling quality, you can address the finer points such as commissions and so forth.

Regards.

billworld
Posts: 13
Joined: Mon Mar 07, 2016 1:59 am

Re: Beginner questions - Setting up MT4 for back-testing

Post by billworld »

tickstory wrote:2) You will only see FXT files once you have exported data via Tickstory. Tickstory produces FXT files that contain tick data that MT4 can use for its back-test (as opposed to the standard MT4 behaviour which is to create its own FXT files which contains only 1-minute data).
3) You will need to either revert your MT4 back to a supported Build for Tickstory v1.7.5 (i.e. < Build 970) or you will need to upgrade to Tickstory v1.8.x to support MT4 Build 1010. If the former, you can find out instructions on how do this here: viewtopic.php?f=2&t=683. We obviously recommend working with the latest version, although we understand that you would like to ensure things work as you expect first.
Regarding 2), at this point for various reasons I desire to use the data I've gotten from FXCM via their data downloader vs Tickstory data. I just need Tickstory to edit the FXT files so I can backtest with commissions. Will this work?

Regarding 3), to be clear the Launch MT4 from TS and other features will fully work if I upgrade TS to v1.8.x? Is there a discounted price for upgrades or does one pay the full price for a new purchase?

tickstory
Posts: 4899
Joined: Sun Jan 06, 2013 12:27 am

Re: Beginner questions - Setting up MT4 for back-testing

Post by tickstory »

Hi Billword,

2) If you are using FXCM data, there is no need to do any export or any launching. MT4 will use its own data as per normal.
3) Yes, the Tickstory v1.8.5 works with the latest MT4 Build 1010. We sent you an email some time ago advising you of a discounted upgrade price for existing users - perhaps it got lost in your spam mail? We will resend you some details by email.

Thanks.

billworld
Posts: 13
Joined: Mon Mar 07, 2016 1:59 am

Re: Beginner questions - Setting up MT4 for back-testing

Post by billworld »

tickstory wrote:2) If you are using FXCM data, there is no need to do any export or any launching. MT4 will use its own data as per normal.
Yes but is not the launching required to force MT4 NOT to overwrite the FXT file when it does its backtest?

billworld
Posts: 13
Joined: Mon Mar 07, 2016 1:59 am

Re: Beginner questions - Setting up MT4 for back-testing

Post by billworld »

Also, can kindly please confirm that in v1.8.5 if I start up MT4 and do NOT connect to the server (to get the broker/server info) and simply work offline (to protect my data from being overwritten by MT) my custom TS created FXTs and backtests will NOT be affected. I had this specific issue months ago when using v1.7.5 where MinLots were not observed when MT4 was launched in offline mode. Accordingly, backtests were not able to have lots in .01 increments therefore the results were inaccurate and useless. I was forced to have to always have connect to the broker server as least once upon each new MT4 launch and THEN take it offline so MinLots were observed. And of course in so doing MT4 always automatically downloads the latest x days/months, etc of broker data which messes up the data set I already imported. That means I have to always re-import the data after each time MT4 is launched which of course is a PITA.

tickstory
Posts: 4899
Joined: Sun Jan 06, 2013 12:27 am

Re: Beginner questions - Setting up MT4 for back-testing

Post by tickstory »

Hi Billworld,

You of course need to connect at least once as part of the MT4 setup process to download the server settings (including instruments, etc). After this, you can work in offline mode. As I recall, the issue you mention with MinLots related to a bug in a specific version (or set of versions) of Metatrader which required you to be connected to the broker otherwise there were back-testing issues. This should now be resolved as of MT4 Build 1010+ and shouldn't pose a problem to keep your terminal offline. Of course, if you have any issues then we're here to help.

Regards.

billworld
Posts: 13
Joined: Mon Mar 07, 2016 1:59 am

Re: Beginner questions - Setting up MT4 for back-testing

Post by billworld »

Okay I upgrade to 1.8.5 and did the following steps:

1) Ensure settings were pointing to the correct install of MT4
2) Quit MT4
3) Open an FXT file from a recent backtest
4) Documented the default settings for the following:
- Base comm = 0
- Comm type = 1
- Comm lots = 0
5) Changed settings to:
- Base comm = 8
- Comm type = 0
- Comm lots = 0
6) Saved settings; received no dialog or any confirmation that it was successfully saved
7) Ran backtest
8) Looked at file system for FXT to see it's datetime stamp changed and noted that it changed just as the backtest was run
9) Reopened FXT file in Tickstory and see the default settings rather than the changed settings

So it's not working and after a whole lot of time on this and now additional money spent I've accomplished nothing. What is wrong here?

billworld
Posts: 13
Joined: Mon Mar 07, 2016 1:59 am

Re: Beginner questions - Setting up MT4 for back-testing

Post by billworld »

And the "Launch MT4 for backtesting" command still doesn't work and yields the same error dialog as previously posted. Whenever FXCM MT4 runs a backtest it overwrites what edits were made to the FXT by TS. If I set the properties of the FXT file within the OS to "read only" in an attempt to lock-in and save the FXT edits performed by TS, the FXCM MT4 backtester simply doesn't run. It needs to write to this file to execute the backtest else no backtest. I've tried numerous time. I simply don't see how this is supposed to work.

tickstory
Posts: 4899
Joined: Sun Jan 06, 2013 12:27 am

Re: Beginner questions - Setting up MT4 for back-testing

Post by tickstory »

Hi BIllworld,

Could you please explain why you need to edit the FXT files that are being created by your FXCM MT4? If you are testing with FXCM data, there should be no need to edit these files as they will already contain the specific settings for the account you are using. This is normal behaviour for MT4 and you do not require Tickstory for this.

Thanks.

Post Reply