Metatrader API

Server for an external communication to MetaTrader. Now, it is available for the version 5.

The interface can run on a user port. Default port is set to 7894.

Now, no client library has been developed and it runs as a server service. The table of requests follows.

 Table of MetaTrader requests

It is possible to download the server API at this link: MTAPI.7z

It is necessary to install the script MT-API to the folder "Scripts" and the strategy "MT-API-HL" to the folder Experts to work everything properly. The DLL file mtAPI.dll should be installed to the same folder as MT-API.ex5. It means "Scripts".

After the script is launched all the available instruments history is updated according to the number of the set periods.

Both DLL import and live trading must be allowed.

Please, open run the MT API in a separete chart that is not used for anything else. Because, if anything is changed in the chart where the script is running the Metatrader crashes immediately. It means Symbol, Timeframe etc. changes the Metatrader will crash.

Log file is located here: %USERPROFILE%\AppData\Local\Imcep\MT_API\

After the server is started it can be shutdown just by a client connected to the server. This little disadvantage is being repaired. The command necessary to be sent by the client to shutdown the server is: 0;0;0;

For testing or shutdown the server can used any TCP client, i.e. Hercules




 MT server API



Neither the owner nor the website operator nor the authors of the content can be responsible for any possible losses (especilly the economical or financial ones) caused by application of the information published on these web sites. There is absolutely no warranty of the accuracy, completeness of information, text, graphics, links etc of the content of these web sites.

Trading of stocks, CFD's and forex is highly risky and can lead to high losses.