Mtapi

Posted on  by admin

Description

by The Multicore Association. Operating system:Windows 7/8/10. Report incorrect info. Downloading MtApi 1.0.40 from the developer's website was possible when we last checked. We cannot confirm if there is a free download of this software available. This free tool was originally designed by The Multicore Association. The program is included in System Utilities.

Build environment

We recommend checking the downloaded files with any free antivirus. The most popular version among MtApi users is 1.0.

From the developer:.

  1. MTAPIĀ® provides a standard API for leveraging task parallelism on embedded devices containing symmetric or asymmetric multicore processors, covering a wide range of target architectures.
  2. Multicore processors require software that splits work into tasks that can be executed in parallel on different processor cores.
  1. Implementing tasks as threads results in significant overhead for creating and controlling parallel execution.

You may want to check out more software, such as LCDHype, myibay eBay bid sniper or TrayCD, which might be similar to MtApi.

How to Build Solution

To build the solution for MT4, you need to choose the configuration to build for x86and start with building the MtApiInstaller. This will build all projects related to MT4:

  • MtApi
  • MTApiService
  • MTConnector

For building the solution for MT5, you need to choose the configuration to build for x64 (or x86 for the 32-bit MT5)) and start build MtApi5Installer. This will build all projects related to MT5:

  • MtApi5
  • MTApiService
  • MT5Connector

All binaries are placed in the project root folder, in the build directory: ../build/.
The installers (*.msi, *.exe) will be found under: ../build/installers/.
All the DLL library binaries (*.dll) in: ../bin/.

MQL files have been pre-compiled to *.ex4 and can be found in the repository here:

  • ..\mql4\
  • ..\mql5\

Changing the source code of the MQL Expert Advisor (EA), requires recompilation with MetaEditor.

Before you can recompile the EA, you need to add/place the following MQL library files, in the MetaEditor../Include/ folder.

  • hash.mqh
  • json.mqh

The MetaEditorinclude folder is usually located here:

Project Structure

  • MTApiService: (C#, .dll)
    The common engine communication project of the API. It contains the implementations of client and server sides.

  • MTConnector, MT5Connector: (C++/CLI, .dll)
    The libraries that are working as proxy between MQL and C# layers. They provides the interfaces.

  • MtApi, MtApi5: (C#, .dll)
    The client side libraries that are using in user's projects.

  • (MQL4/MQL5, .ex4)
    MT4 and MT5 Expert Advisors linked to terminal's charts. They executes API's functions and provides trading events.

  • MtApiInstaller, MtApi5Installer(WIX, .msi)
    The project's installers.

  • MtApiBootstrapper, MtApi5Bootstrapper(WIX, .exe)
    The installation package bundles. There are wrappers for installers that contains the vc_redistlibraries (Visual C++ runtime) placed in [root]\vcredist.

Installation

Use the installers to setup all libraries automatically.

  • For MT4, use: MtApiInstaller_setup.exe
  • For MT5, use: MtApi5Installer setup.exe

MtApiBootstrapper and MtApi5Bootstrapper are installation package bundles that contain the installers and vc_redist Windows libraries. The installers place the MTApiService.dll into the Windows GAC (Global Assembly Cache) and copies MTConnector.dll and MT5Connector.dll into the Windows's system folder, whose location depend on your Windows OS. After installation, the MtApi.ex4 (or MtApi5.ex5) EA, must be copied into your Terminal data folder for Expert Advisors, which is normally located in: ../MQL5/Experts/.

To quickly navigate to the trading platform data folder, click: File >> "Open data folder" in your MetaTrader Terminal.

Using

MtApi provides two types of connection to MetaTrader terminal: local (using Pipe or TCP) and remote (via TCP).
The port of connection is defined by MtApi expert.

Console sample for MT5: