mirror of
https://github.com/vdemydiuk/mtapi.git
synced 2026-08-13 10:48:08 +00:00
Updated readme file
This commit is contained in:
@@ -6,18 +6,9 @@ Most of the API's functions duplicates MQL interface.
|
|||||||
The project was designed using [WCF](https://docs.microsoft.com/en-us/dotnet/framework/wcf/whats-wcf) framework with the intention of using flexibility to setup connections.
|
The project was designed using [WCF](https://docs.microsoft.com/en-us/dotnet/framework/wcf/whats-wcf) framework with the intention of using flexibility to setup connections.
|
||||||
|
|
||||||
## Build environment
|
## Build environment
|
||||||
The project is supported by Visual Studio 2017.
|
The project is supported by Visual Studio 2022.
|
||||||
It requires WIX Tools for preparing project's installers (http://wixtoolset.org/).
|
It requires HeatWave for VS2022 - set of tools for creating WiX installation packages (https://marketplace.visualstudio.com/items?itemName=FireGiant.FireGiantHeatWaveDev17).
|
||||||
|
Just install the VS extensions.
|
||||||
Installing WIX for mtapi:
|
|
||||||
1. Make sure you install one of the latest (3.14+) development releases of the wixtoolset.
|
|
||||||
(If you use an older installer you will have to install the ancient .NET 3.5 framework, and that I am sure you will regret, if you do!).
|
|
||||||
2. Run the installer and wait for completion or for asking to also install the VS extensions.
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
3. Install the WiX Toolset Visual Studio Extension depending on your VS version.
|
|
||||||
For example, if you use VS 2017, go [here](https://marketplace.visualstudio.com/items?itemName=WixToolset.WixToolsetVisualStudio2017Extension) or download from their GitHub, releases.
|
|
||||||
|
|
||||||
Use [MetaEditor](https://www.metatrader5.com/en/automated-trading/metaeditor) to working with MQL files.
|
Use [MetaEditor](https://www.metatrader5.com/en/automated-trading/metaeditor) to working with MQL files.
|
||||||
|
|
||||||
@@ -25,17 +16,19 @@ Use [MetaEditor](https://www.metatrader5.com/en/automated-trading/metaeditor) to
|
|||||||
|
|
||||||
To build the solution for **MT4**, you need to choose the configuration to build for **`x86`**
|
To build the solution for **MT4**, you need to choose the configuration to build for **`x86`**
|
||||||
and start with building the **`MtApiInstaller`**. This will build all projects related to MT4:
|
and start with building the **`MtApiInstaller`**. This will build all projects related to MT4:
|
||||||
- `MtApi`
|
- `MtApi`
|
||||||
- `MTApiService`
|
- `MtClient`
|
||||||
|
- `MtService`
|
||||||
- `MTConnector`
|
- `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:
|
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`
|
- `MtApi5`
|
||||||
- `MTApiService`
|
- `MtClient`
|
||||||
|
- `MtService`
|
||||||
- `MT5Connector`
|
- `MT5Connector`
|
||||||
|
|
||||||
All binaries are placed in the project root folder, in the *build* directory: **`../build/`**.
|
All binaries are placed in the project root folder, in the *build* directory: **`../build/`**.
|
||||||
The installers (**`*.msi, *.exe`**) will be found under: **`../build/installers/`**.
|
The installers (**`*.msi) will be found under: **`../build/installers/`**.
|
||||||
All the DLL library binaries (**`*.dll`**) in: **`../bin/`**.
|
All the DLL library binaries (**`*.dll`**) in: **`../bin/`**.
|
||||||
|
|
||||||
MQL files have been pre-compiled to **`*.ex4`** and can be found in the repository here:
|
MQL files have been pre-compiled to **`*.ex4`** and can be found in the repository here:
|
||||||
@@ -56,13 +49,13 @@ C:\Users\<username>\AppData\Roaming\MetaQuotes\Terminal\<terminal-hash>\MQL5\Inc
|
|||||||
|
|
||||||
## Project Structure
|
## Project Structure
|
||||||
|
|
||||||
* `MTApiService`: **`(C#, .dll)`**
|
* `MtService`: **`(C++, .dll)`**
|
||||||
The common engine communication project of the API. It contains the implementations of client and server sides.
|
The common engine communication project of the API. It contains the implementations of client and server sides. It uses WebSocket for communication.
|
||||||
|
|
||||||
* `MTConnector, MT5Connector`: **`(C++/CLI, .dll)`**
|
* `MTConnector, MT5Connector`: **`(C++/CLI, .dll)`**
|
||||||
The libraries that are working as proxy between MQL and C# layers. They provides the interfaces.
|
The libraries that are working as proxy between MQL and C# layers. They provides the interfaces.
|
||||||
|
|
||||||
* `MtApi, MtApi5`: **`(C#, .dll)`**
|
* `MtApi, MtApi5, MtClient`: **`(C#, .dll)`**
|
||||||
The client side libraries that are using in user's projects.
|
The client side libraries that are using in user's projects.
|
||||||
|
|
||||||
* **`(MQL4/MQL5, .ex4)`**
|
* **`(MQL4/MQL5, .ex4)`**
|
||||||
@@ -71,23 +64,20 @@ MT4 and MT5 *Expert Advisors* linked to terminal's charts. They executes API's
|
|||||||
* `MtApiInstaller, MtApi5Installer` **`(WIX, .msi)`**
|
* `MtApiInstaller, MtApi5Installer` **`(WIX, .msi)`**
|
||||||
The project's installers.
|
The project's installers.
|
||||||
|
|
||||||
* `MtApiBootstrapper, MtApi5Bootstrapper` **`(WIX, .exe)`**
|
* `Boost libraries` **`(*.lib)`**
|
||||||
The installation package bundles. There are wrappers for installers that contains the vc_redist
|
Precompiled x64 and x86 libraries for using with C++ projects, placed in [root]\thirdparty\.
|
||||||
libraries (Visual C++ runtime) placed in [root]\vcredist\.
|
|
||||||
|
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
Use the installers to setup all libraries automatically.
|
Use the installers to setup all libraries automatically.
|
||||||
- For *MT4*, use: `MtApiInstaller_setup.exe`
|
- For *MT4*, use: `MtApiInstaller.msi`
|
||||||
- For *MT5*, use: `MtApi5Installer setup.exe`
|
- For *MT5*, use: `MtApi5Installer_x64.msi`
|
||||||
|
|
||||||
`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.
|
To quickly navigate to the trading platform *data folder*, click: **`File >> "Open data folder"`** in your *MetaTrader* Terminal.
|
||||||
|
|
||||||
## Using
|
## Using
|
||||||
MtApi provides two types of connection to MetaTrader terminal: local (using Pipe or TCP) and remote (via TCP).
|
MtApi provides two types of connection to MetaTrader terminal: local and remote (via TCP).
|
||||||
The port of connection is defined by MtApi expert.
|
The port of connection is defined by MtApi expert.
|
||||||
|
|
||||||
Console sample for MT5:
|
Console sample for MT5:
|
||||||
@@ -229,6 +219,4 @@ namespace MtApi5Console
|
|||||||
|
|
||||||
|
|
||||||
# Telegram Channel
|
# Telegram Channel
|
||||||
https://t.me/mtapi4
|
|
||||||
|
|
||||||
https://t.me/joinchat/GfnfUxvelQCLvvIvLO16-w
|
https://t.me/joinchat/GfnfUxvelQCLvvIvLO16-w
|
||||||
|
|||||||
Reference in New Issue
Block a user