{"id":3905,"date":"2023-06-29T20:14:57","date_gmt":"2023-06-29T18:14:57","guid":{"rendered":"https:\/\/cplugin.com\/?post_type=docs&#038;p=3905"},"modified":"2023-06-29T20:14:58","modified_gmt":"2023-06-29T18:14:58","password":"","slug":"emir","status":"publish","type":"docs","link":"https:\/\/cplugin.com\/docs\/apps\/emir\/","title":{"rendered":"EMIR"},"content":{"rendered":"\n<p>This is a tool to generate and send trade reports to UnaVista repository.<\/p>\n\n\n\n<p>It compatible with MT4 and MT5.<\/p>\n\n\n\n<p>For connecting to MT4 it uses MySQL DB made by MetaQuotes Report Server with few additional tables. You will need to install another tool,&nbsp;<em>Extended Replication<\/em>.<\/p>\n\n\n\n<p>For connecting to MT5 it uses MetaQuotes MT5 WebAPI.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"EMIR-Quickinstallationguide\">Quick installation guide<\/h3>\n\n\n\n<p>First of all, you will need to install&nbsp;<a href=\"https:\/\/www.microsoft.com\/en-US\/download\/details.aspx?id=40779\">Microsoft .NET Framework 4.5.1<\/a>&nbsp;to your server.<\/p>\n\n\n\n<p>Installation is simple, download and unpack package to any folder on your PC.<\/p>\n\n\n\n<p>Then you will need to obtain&nbsp;<code>MetaQuotes.MT5WebAPI.dll<\/code>&nbsp;file (at least build 1325) and put to the application\u2019s folder. We have no rights to distribute this file.<\/p>\n\n\n\n<p>Then, deploy&nbsp;<em>Extended Replication<\/em>&nbsp;tool and be sure that your MySQL DB contains these tables:&nbsp;<code>mt4_trades<\/code>&nbsp;and&nbsp;<code>mt4_symbols<\/code>.<\/p>\n\n\n\n<p>After that adjust settings to fit your needs, you will see the file&nbsp;<code>CPlugin.EMIR.exe.config<\/code>, the main settings file.<\/p>\n\n\n\n<p>Most important part below <strong>CPlugin.EMIR.exe.config<\/strong>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"xml\" class=\"language-xml\">&lt;connectionStrings>\r\n  &lt;add name=\"mysqlConnection\" connectionString=\"server=mysql.server.com;uid=login;password=***;database=mt4_reports\" providerName=\"MySql.Data.MySqlClient\" \/>\r\n&lt;\/connectionStrings>\r\n \r\n&lt;userSettings>\r\n  &lt;CPlugin.EMIR.Properties.Settings>\r\n    &lt;setting name=\"LEI\" serializeAs=\"String\">\r\n      &lt;value>213800....&lt;\/value>\r\n    &lt;\/setting>\r\n    &lt;setting name=\"ftp_server\" serializeAs=\"String\">\r\n      &lt;value>sftx.londonstockexchange.com&lt;\/value>\r\n    &lt;\/setting>\r\n    &lt;setting name=\"ftp_port\" serializeAs=\"String\">\r\n      &lt;value>22&lt;\/value>\r\n    &lt;\/setting>\r\n    &lt;setting name=\"ftp_login\" serializeAs=\"String\">\r\n      &lt;value>login&lt;\/value>\r\n    &lt;\/setting>\r\n    &lt;setting name=\"ftp_password\" serializeAs=\"String\">\r\n      &lt;value>***&lt;\/value>\r\n    &lt;\/setting>\r\n    &lt;setting name=\"ftp_outgoing\" serializeAs=\"String\">\r\n      &lt;value>\/Outgoing&lt;\/value>\r\n    &lt;\/setting>\r\n    &lt;setting name=\"ftp_incoming\" serializeAs=\"String\">\r\n      &lt;value>\/Incoming&lt;\/value>\r\n    &lt;\/setting>\r\n    &lt;setting name=\"platform_server\" serializeAs=\"String\">\r\n      &lt;value>mt.server.com&lt;\/value>\r\n    &lt;\/setting>\r\n    &lt;setting name=\"platform_port\" serializeAs=\"String\">\r\n      &lt;value>1970&lt;\/value>\r\n    &lt;\/setting>\r\n    &lt;setting name=\"platform_login\" serializeAs=\"String\">\r\n      &lt;value>1000&lt;\/value>\r\n    &lt;\/setting>\r\n    &lt;setting name=\"platform_password\" serializeAs=\"String\">\r\n      &lt;value>***&lt;\/value>\r\n    &lt;\/setting>\r\n    &lt;setting name=\"client_server_prefix\" serializeAs=\"String\">\r\n      &lt;value>MT5Test&lt;\/value>\r\n    &lt;\/setting>\r\n    &lt;setting name=\"platform_type\" serializeAs=\"String\">\r\n      &lt;value>MT5.WebAPI&lt;\/value>\r\n    &lt;\/setting>\r\n    &lt;setting name=\"report_prefix\" serializeAs=\"String\">\r\n      &lt;value>companyName&lt;\/value>\r\n    &lt;\/setting>\r\n  &lt;\/CPlugin.EMIR.Properties.Settings>\r\n&lt;\/userSettings><\/code><\/pre>\n\n\n\n<p>LEI - your company\u2019s LEI code<\/p>\n\n\n\n<p>ftp_server - UnaVista ftp server address<br>ftp_port - UnaVista ftp server port<br>ftp_login - UnaVista ftp server login<br>ftp_password - UnaVista ftp server password<\/p>\n\n\n\n<p>platform_type can be one of two supported types: MT4.MySQL or MT5.WebAPI<\/p>\n\n\n\n<p>platform_server - your MT4\/MT5 server address<br>platform_port - your MT4\/MT5 server port<br>platform_login - your MT4\/MT5 server login<br>platform_password - your MT4\/MT5 server password<\/p>\n\n\n\n<p>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\u2019t use other than alphanumeric symbols, no spaces allowed.<\/p>\n\n\n\n<p>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\u2019t use other than alphanumeric symbols, no spaces allowed.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"EMIR-Running\">Running<\/h3>\n\n\n\n<p>UnaVista provides PROD (real) and UAT (test) environments. At the beginning it is recommended to use UAT.<\/p>\n\n\n\n<p>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:<br>-file - connect to MT4\/MT5 server, get data and generate report file<br>-push - make application to connect to UnaVista ftp server and upload generated CSV file<br>-pull - make application to connect to UnaVista ftp server and download response CSV files<\/p>\n\n\n\n<p>For example, let\u2019s generate report, upload it and get latest response files from UnaVista:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><code>CPlugin.EMIR.exe -file -push -pull<\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>Under .logs sub-folder you will find application\u2019s journal.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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,&nbsp;Extended Replication. For connecting to MT5 it uses MetaQuotes MT5 WebAPI. Quick installation [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"doc_category":[87],"doc_tag":[],"class_list":["post-3905","docs","type-docs","status-publish","hentry","doc_category-apps"],"year_month":"2026-06","word_count":679,"total_views":0,"reactions":{"happy":0,"normal":0,"sad":0},"author_info":{"name":"Vladislav Sorokin","author_nicename":"cplugin","author_url":"https:\/\/cplugin.com\/blog\/author\/cplugin\/"},"doc_category_info":[{"term_name":"Standalone Apps","term_url":"https:\/\/cplugin.com\/docs-category\/apps\/"}],"doc_tag_info":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.7 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>EMIR - CPlugin<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/cplugin.com\/docs\/emir\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"EMIR - CPlugin\" \/>\n<meta property=\"og:description\" content=\"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,&nbsp;Extended Replication. For connecting to MT5 it uses MetaQuotes MT5 WebAPI. Quick installation [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/cplugin.com\/docs\/emir\/\" \/>\n<meta property=\"og:site_name\" content=\"CPlugin\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/cplugin\" \/>\n<meta property=\"article:modified_time\" content=\"2023-06-29T18:14:58+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:site\" content=\"@CPlugin_com\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/cplugin.com\/docs\/emir\/\",\"url\":\"https:\/\/cplugin.com\/docs\/emir\/\",\"name\":\"EMIR - CPlugin\",\"isPartOf\":{\"@id\":\"https:\/\/cplugin.com\/#website\"},\"datePublished\":\"2023-06-29T18:14:57+00:00\",\"dateModified\":\"2023-06-29T18:14:58+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/cplugin.com\/docs\/emir\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/cplugin.com\/docs\/emir\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/cplugin.com\/docs\/emir\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/cplugin.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Docs\",\"item\":\"https:\/\/cplugin.com\/wiki\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"EMIR\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/cplugin.com\/#website\",\"url\":\"https:\/\/cplugin.com\/\",\"name\":\"CPlugin\",\"description\":\"CPlugin offers software and services to Forex brokers who use MetaQuotes MetaTrader 4 and 5 which are most advanced and reliable trading platforms.\",\"publisher\":{\"@id\":\"https:\/\/cplugin.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/cplugin.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/cplugin.com\/#organization\",\"name\":\"CPlugin Ltd.\",\"url\":\"https:\/\/cplugin.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/cplugin.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.cplugin.com\/wp-content\/uploads\/2021\/07\/CPlugin-logo-1.png\",\"contentUrl\":\"https:\/\/www.cplugin.com\/wp-content\/uploads\/2021\/07\/CPlugin-logo-1.png\",\"width\":1823,\"height\":677,\"caption\":\"CPlugin Ltd.\"},\"image\":{\"@id\":\"https:\/\/cplugin.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/cplugin\",\"https:\/\/x.com\/CPlugin_com\",\"https:\/\/www.linkedin.com\/company\/cplugin\",\"https:\/\/www.youtube.com\/c\/CPlugin_com\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"EMIR - CPlugin","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/cplugin.com\/docs\/emir\/","og_locale":"en_US","og_type":"article","og_title":"EMIR - CPlugin","og_description":"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,&nbsp;Extended Replication. For connecting to MT5 it uses MetaQuotes MT5 WebAPI. Quick installation [&hellip;]","og_url":"https:\/\/cplugin.com\/docs\/emir\/","og_site_name":"CPlugin","article_publisher":"https:\/\/www.facebook.com\/cplugin","article_modified_time":"2023-06-29T18:14:58+00:00","twitter_card":"summary_large_image","twitter_site":"@CPlugin_com","twitter_misc":{"Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/cplugin.com\/docs\/emir\/","url":"https:\/\/cplugin.com\/docs\/emir\/","name":"EMIR - CPlugin","isPartOf":{"@id":"https:\/\/cplugin.com\/#website"},"datePublished":"2023-06-29T18:14:57+00:00","dateModified":"2023-06-29T18:14:58+00:00","breadcrumb":{"@id":"https:\/\/cplugin.com\/docs\/emir\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/cplugin.com\/docs\/emir\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/cplugin.com\/docs\/emir\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/cplugin.com\/"},{"@type":"ListItem","position":2,"name":"Docs","item":"https:\/\/cplugin.com\/wiki\/"},{"@type":"ListItem","position":3,"name":"EMIR"}]},{"@type":"WebSite","@id":"https:\/\/cplugin.com\/#website","url":"https:\/\/cplugin.com\/","name":"CPlugin","description":"CPlugin offers software and services to Forex brokers who use MetaQuotes MetaTrader 4 and 5 which are most advanced and reliable trading platforms.","publisher":{"@id":"https:\/\/cplugin.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/cplugin.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/cplugin.com\/#organization","name":"CPlugin Ltd.","url":"https:\/\/cplugin.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/cplugin.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.cplugin.com\/wp-content\/uploads\/2021\/07\/CPlugin-logo-1.png","contentUrl":"https:\/\/www.cplugin.com\/wp-content\/uploads\/2021\/07\/CPlugin-logo-1.png","width":1823,"height":677,"caption":"CPlugin Ltd."},"image":{"@id":"https:\/\/cplugin.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/cplugin","https:\/\/x.com\/CPlugin_com","https:\/\/www.linkedin.com\/company\/cplugin","https:\/\/www.youtube.com\/c\/CPlugin_com"]}]}},"_links":{"self":[{"href":"https:\/\/cplugin.com\/wp-json\/wp\/v2\/docs\/3905","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cplugin.com\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/cplugin.com\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/cplugin.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cplugin.com\/wp-json\/wp\/v2\/comments?post=3905"}],"version-history":[{"count":1,"href":"https:\/\/cplugin.com\/wp-json\/wp\/v2\/docs\/3905\/revisions"}],"predecessor-version":[{"id":3906,"href":"https:\/\/cplugin.com\/wp-json\/wp\/v2\/docs\/3905\/revisions\/3906"}],"wp:attachment":[{"href":"https:\/\/cplugin.com\/wp-json\/wp\/v2\/media?parent=3905"}],"wp:term":[{"taxonomy":"doc_category","embeddable":true,"href":"https:\/\/cplugin.com\/wp-json\/wp\/v2\/doc_category?post=3905"},{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/cplugin.com\/wp-json\/wp\/v2\/doc_tag?post=3905"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}