As previously noted in the section on the MT4 database, the contains important information in order to accurately and fully evaluate a back-test. This information includes broker-specific information that define valid lot sizes, commissions, account leverage and so forth. Tickstory allows you to define all these details during the MT4 Export process and these details are subsequently embedded in your MT4 back-test database.
The broker-specific “Metratrader information” can be stored in a “MT4 Config” (.mt4config) file for later use or shared amongst traders who would like to compare their results. By doing so, traders can ensure consistency and focus on optimising their settings or the EA itself, rather than trying to track down why their results are constantly changing despite no code and/or parameter changes. Given the fact that this information is key to an EA's back-test evaluation, you may wish to customise various settings to take full control over what is exported within the MT4 data file. The “Metatrader Info” tab is designed specifically for this purpose and is shown below.
As you can see from the screen-shot, there is some detailed information that is used to produce the MT4 exported database. By default, Tickstory provides a “Generic Broker” configuration that allows users to use relatively standard settings to produce their exports. Of course, this information may not necessarily match your brokers, so it makes sense to review this information.
For example, if you wish to view the properties used for a EURUSD export, select the Symbol “EURUSD” in the 'Symbol properties' box as shown below.
When you do, the system will display all the settings for EURUSD, including the standard lotsize, tick value and so on. When performing a back-test, it will be these values that are used to determine profit, maximum lot sizes and so forth. As an exercise, let's set the spread for EURUSD to 3 pips by changing the value in the 'Spread' field. You will note that the equivalent in pips will display to the right of the text-box as shown below:
Fields of particular note are:
Advanced user note: MQL developers will recognise each of the properties map one-to-one with information available in MQL. For example, when you call the function:
in your EA during the back-test, it will yield the value that is displayed in the “Digits” field for EURUSD. Similarly, invoking:
will yield the value in the 'Account Currency' field.
As you can appreciate, it would be difficult to craft an entire broker configuration by hand. You would need to somehow find out all the details about each of the settings from your broker and input them into the Tickstory configuration. Fortunately, however, there is a way of automatically generating these settings. This is done by running a special Tickstory Expert Advisor on your system that will generate the settings for you. In order to perform this task, follow the steps below:
1. Click on the “Help” tab within the Tickstory MT4 export dialog. This will give you the same instructions as described here about how to deploy the Tickstory EA to your MT4 installation.
2. Click on the Deploy MQ4 button. This will automatically deploy the EA to your MT4 Installation if you have already configured it. If not, it will prompt you for the correct folder location which should be something like:
C:\Program Files\Metatrader Broker\experts
3. Restart your MT4 terminal and go to the MT4 Navigator→Expert Advisor tree. You should see the Tickstory EA appear in the list. Double-click on it to apply it on any LIVE chart or drag the icon onto a chart window.
4. A prompt will come up to configure the EA. Configure the Tickstory EA with the “Input” settings:
An example settings screen showing a un-connected micro account are shown below.
Press the OK button once to are done to accept the settings.
5. The EA will start running and you will be able to see its progress in the “Experts” tab. If there are any errors, they will appear in this screen. Likewise, if the system can't find information on a particular instrument, it will tell you in this screen along with what defaults it has assumed. Once the script has successfully completed, a config file with all the details will be placed in your Metatrader's “experts\files” directory named Mt4.<BrokerName>.Servername.mt4config. For example:
<MT4 Data Folder>\experts\files\Mt4.Broker.Servername.mt4config
6. Back in the Tickstory app, click on the 'Metatrader Info' tab within the MT4 export settings and load the config file from the MT4 experts\files directory. (as described in the section on “Loading settings”).
7. You can now view, edit and save your broker settings in Tickstory.
The MT4 'Metatrader Info' tab allows you to save the current displayed settings to a config file. This config file can then be used later or shared amongst the trader community to ensure you can generate consistent data exports and compare your back-tests. To save your settings, you can either choose “Save as default” which will automatically save your config as the default one. This means whenever you open the MT4 Export dialog, it is these settings that will be used. Alternatively, you can save the config to a specifically named file so that it can be manually loaded (using the “Load settings” button) for the next time you do an export.
The 'Load settings' function allows you to load a config file that contains all the information required by the MT4 Exporter. This config file could have been:
To load the config file, simply click on the 'Load settings' button and then browse to the directory location where the file resides. Config files that are bundled with Tickstory are stored in the Application directory. In the case of files that were generated by the Tickstory EA, these will reside in your Metatrader installation's expert/files directory.