This is a tool to generate and send trade reports to UnaVista repository.
It compatible with MT4 and MT5.
For connecting to MT4 it uses MySQL DB made by MetaQuotes Report Server with few additional tables. You will need to install another tool, Extended Replication.
For connecting to MT5 it uses MetaQuotes MT5 WebAPI.
Quick installation guide #
First of all, you will need to install Microsoft .NET Framework 4.5.1 to your server.
Installation is simple, download and unpack package to any folder on your PC.
Then you will need to obtain MetaQuotes.MT5WebAPI.dll
file (at least build 1325) and put to the application’s folder. We have no rights to distribute this file.
Then, deploy Extended Replication tool and be sure that your MySQL DB contains these tables: mt4_trades
and mt4_symbols
.
After that adjust settings to fit your needs, you will see the file CPlugin.EMIR.exe.config
, the main settings file.
Most important part below CPlugin.EMIR.exe.config:
<connectionStrings>
<add name="mysqlConnection" connectionString="server=mysql.server.com;uid=login;password=***;database=mt4_reports" providerName="MySql.Data.MySqlClient" />
</connectionStrings>
<userSettings>
<CPlugin.EMIR.Properties.Settings>
<setting name="LEI" serializeAs="String">
<value>213800....</value>
</setting>
<setting name="ftp_server" serializeAs="String">
<value>sftx.londonstockexchange.com</value>
</setting>
<setting name="ftp_port" serializeAs="String">
<value>22</value>
</setting>
<setting name="ftp_login" serializeAs="String">
<value>login</value>
</setting>
<setting name="ftp_password" serializeAs="String">
<value>***</value>
</setting>
<setting name="ftp_outgoing" serializeAs="String">
<value>/Outgoing</value>
</setting>
<setting name="ftp_incoming" serializeAs="String">
<value>/Incoming</value>
</setting>
<setting name="platform_server" serializeAs="String">
<value>mt.server.com</value>
</setting>
<setting name="platform_port" serializeAs="String">
<value>1970</value>
</setting>
<setting name="platform_login" serializeAs="String">
<value>1000</value>
</setting>
<setting name="platform_password" serializeAs="String">
<value>***</value>
</setting>
<setting name="client_server_prefix" serializeAs="String">
<value>MT5Test</value>
</setting>
<setting name="platform_type" serializeAs="String">
<value>MT5.WebAPI</value>
</setting>
<setting name="report_prefix" serializeAs="String">
<value>companyName</value>
</setting>
</CPlugin.EMIR.Properties.Settings>
</userSettings>
LEI - your company’s LEI code
ftp_server - UnaVista ftp server address
ftp_port - UnaVista ftp server port
ftp_login - UnaVista ftp server login
ftp_password - UnaVista ftp server password
platform_type can be one of two supported types: MT4.MySQL or MT5.WebAPI
platform_server - your MT4/MT5 server address
platform_port - your MT4/MT5 server port
platform_login - your MT4/MT5 server login
platform_password - your MT4/MT5 server password
client_server_prefix - your server alias, will be used in reports to identify trades and relying party. Usually, UnaVista define this prefix and tell to you. For instance, MT4Real. Please don’t use other than alphanumeric symbols, no spaces allowed.
report_prefix - report file prefix, to uniquely identify reports. Something that uniquely identify your server. For example, if you have many of them, reported simultaneously. For example, company name: ForexCorp. Please don’t use other than alphanumeric symbols, no spaces allowed.
Running #
UnaVista provides PROD (real) and UAT (test) environments. At the beginning it is recommended to use UAT.
When you run .exe file you can choose one or many features to be executed. Just add any of this parameter to the comman line:
-file - connect to MT4/MT5 server, get data and generate report file
-push - make application to connect to UnaVista ftp server and upload generated CSV file
-pull - make application to connect to UnaVista ftp server and download response CSV files
For example, let’s generate report, upload it and get latest response files from UnaVista:
CPlugin.EMIR.exe -file -push -pull |
Under .logs sub-folder you will find application’s journal.