User Tools

Site Tools


customising_mt4_export_settings

Customising MT4 Export Settings

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:

  • Map to - The symbol name shown in Tickstory is not necessarily the same symbol name in Metatrader. This field allows you to map this particular symbol (eg. EURUSD or DEUIDXEUR) to the equivalent symbol in MT4 (eg. EURUSDm or GER30). The mapped symbol name needs to match your MT4 broker exactly (including case). For simplicity, a list of MT4 symbols available from your chosen MT4 terminal is available for selection. By choosing the corresponding symbol name, you will also automatically load the specific MT4 instrument settings (eg. Digits, Lot Size) from your broker terminal. If you leave the 'Map to' field blank, Tickstory assumes the symbol name is the same as in your MT4 terminal.
  • Min lot/Lot step - These values have bearing on many EAs that incrementally change lot sizes. If these values are not set correctly, you can receive “Order Send 131” errors when running your EA. Consult the MQL documentation for further information.
  • Digits - This field represents the number of fractional digits that applies to the symbol. For example, a 5 digit price will look like 1.4539 whereas the same price in 4 digits will look like 1.454.

Generally speaking, once these values have been loaded from your broker, you should not need to alter them except for advanced testing.

NOTE: The 'Spread' field was used in earlier Metatrader versions (circa pre-2015) and has now been obsolesced in favour of a “Spread” field on the Strategy Tester's parameter screen. This new spread field in the Strategy Tester allows you to change the spread easily between back-tests. Therefore, setting the Spread field within Tickstory no longer has any effect for the latest Metatrader versions and can be ignored. It remains available in Tickstory for backward compatibility with earlier versions of Metatrader only.

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:

  MarketInfo("EURUSD",MODE_DIGITS);

in your EA during the back-test, it will yield the value that is displayed in the “Digits” field for EURUSD. Similarly, invoking:

  AccountCurrency();

will yield the value in the 'Account Currency' field.

Using the settings from your own broker

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.

There are two sections of settings to acquire from your broker:

  1. Is for account-level details such as Leverage and Commission and;
  2. Is for symbol-specific information such as the Digits and Lot Size fields.

In order to get your Account and Symbol-specific settings from your broker, please do the following:

  1. In Metatrader 4's Strategy Tester, select any EA, the 1H period and the symbol you wish to test (eg. “EURUSD”) and the Open price modelling quality type.
  2. Press the Start button on the Strategy Tester and wait for the test to complete.
  3. In Tickstory, select the “Load from FXT…” button. In the file chooser, you should see a file called [SymbolName]60_2.fxt where “SymbolName” will be the name of the symbol you chose in the Strategy Tester (eg. EURUSD). Note the Timeframe “60” minutes and “2” for Open modelling quality type that you selected.
  4. Once you have selected the FXT, all your Account and Symbol settings are automatically loaded.
NOTE: This functionality has been added in v1.9.5.4 of Tickstory. If you have an earlier version, please upgrade.

Saving Settings

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.

Loading Settings

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:

  • A file that you previously customized and saved.
  • A file that was sent to you by a trading colleague.
  • A file that was generated as part of the process to 'generate settings from your broker'.

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.

customising_mt4_export_settings.txt · Last modified: 2020/11/18 00:56 by tickstory