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 http://new.hwg.cz/files/download/sw/version/hercules_3-2-8.exe

 

   

 

 MT server API

 

Odmítnutí odpovědnosti

Vlastník, provozovatel, autoři ani další osoby zveřejňující informace na těchto webových stránkách nenesou a ani nemohou nést odpovědnost za případné jakkékoliv ztráty (ale zejména ekonomické a finanční) vzniklé jejich dalším použitím. Není absolutně žádná záruka na přesnost ani kompletnost informací, textů, obrázků, odkazů apod. v obsahu těchto webových stránek.

Obchodování na burzách, s komoditami, na forexovém trhu a dalších trzích s sebou nese vysoké riziko ztrát.