Info for Providers

How to make an EA compatible with FXTestify


If you have decided to make your EA compatible to the FXTestify database, well done and welcome to the project! We are looking forward to cooperate with you in any way.

The FXTestify database holds trades and EA setups (test sets). In order for the database to know the setup that was steering the EA when a trade was opened or closed, we use MetaTrader template files with special names that are automatically written on every EA initialization. These templates are then uploaded to the database periodically by our Connector EA and deleted afterwards. More information about the testing aspect can be found on the Info for Testers page. There is also a FAQs page to answer common questions.

There is not much to do on your side. You only have to add a single statement as the very first in your EA's OnInit() section. This statement will write the needed template by calling a standard MQL function:

    ChartSaveTemplate(0,StringFormat("ZZT2MTPL-%s-%s-%s-%d-%d-%d-%d",
        "XXX","YYY",Symbol(),Period(),AccountNumber(),TimeCurrent(),MagicNumber));

Some parts of this statement now must be adapted to your situation:

  • XXX has to be replaced by a 2..5 character long acronym for your organization. Better if longer. Don't exceed 5 characters!
  • YYY has to be replaced by a 2..5 character long unique acronym for your EA. Better if longer. Don't exceed 5 characters!
  • Symbol() is correct for a single-pair EA. If your EA is a multi-pair trader, replace Symbol() with the string "MULSYM".
  • MagicNumber must be the name of the respective (input) variable in your EA. Modify it according to your code.
  • If your EA uses more than one magic number to identify its trades, you must append all magic number variables at the end. Dont forget to modify the formatting string and add -d% placeholders accordingly!

Here are three examples of the statement. The first for a fictive multi-pair EA named "The One And Only" written by "Jerry Lopez Forex Group", where the variable for the magic number is defined as "Magnum" in the EA code. The second for a fictive single-pair EA named "Over the Top and Beyond" written by "Acme Global Enterprises", where the variable for the magic number is defined as "MN" in the EA code. The third for a fictive multi-pair EA named "Super Hero" written by "Robert Maus" that uses 4 different magic numbers stored in variables M1, M2, M3 and M4:

    ChartSaveTemplate(0,StringFormat("ZZT2MTPL-%s-%s-%s-%d-%d-%d-%d",
        "JLFG","TOAO","MULSYM",Period(),AccountNumber(),TimeCurrent(),Magnum));


    ChartSaveTemplate(0,StringFormat("ZZT2MTPL-%s-%s-%s-%d-%d-%d-%d",
        "AGE","OTTAB",Symbol(),Period(),AccountNumber(),TimeCurrent(),MN));


    ChartSaveTemplate(0,StringFormat("ZZT2MTPL-%s-%s-%s-%d-%d-%d-%d-%d-%d-%d",
        "RM","SH","MULSYM",Period(),AccountNumber(),TimeCurrent(),M1,M2,M3,M4));

You see how simple that really is. Nobody else than you has to touch your code, nothing to import or include, nothing cryptic, only this single statement. With two more lines (input variable definition and if statement) you can even make it optional so your users can decide whether they want to generate the templates or not. Otherwise they might end up with quite some templates they have to delete manually.

We will be happy seeing your EAs added to the system. Let us create a maximum of interest and a solid testers base for your projects. There are some things that need to be prepared in the database for integrating your EAs perfectly. We need to have a short description, a download link and default settings for each EA presented on the website. Please contact us to make the cooperation a pleasure for all sides.

One last appeal. During the test phase of your EA there will be ideas to change the code. Of course you can fix bugs and improve things. But please be sensible to the following aspects: If you change the EA inputs, all tests might automatically start from scratch as new tests because the test set has changed. Avoid deleting old obsolete inputs, just leave them there. Also avoid changing the default values for inputs. If you change important parts or add inputs, better consider the expert being a new one and publish it with a different database expert code. This will help you to judge whether your changes really improved results.

We will be happy to help you in the process. Before you are going to release your database compatible EA, and if you have any kind of question or feedback, please contact us.

Thank you for any contribution.
René and Thomas