mt-R – library MetaTrader 5

The source mt4R library that was developed by Bernd Kreuss was modified several times by different authors. Its latest version is available here with the required links to the source library, all changes and GitHub address.

This version of the library is adjusted to 64 bit and thus can be used by the МetaТrader 5 library. Two libraries are available: R64 for the МetaТrader 5 terminal and R86 for МetaТrader 4.

The library requires a DLL,, which should be saved to the Libraries foldeer of the terminal, and the R.mqh file should be saved to Include. The following directive should be included in the EA/indicator text:

#include <R.mqh>

In addition, the path to the Rterm file should be written in the EA/indicator text. For example:

“d:\\R\\R-3.3.2\\bin\\x64\\Rterm.exe”

The #include <R.mqh> file contains links to both libraries, therefore after launch you will receive an error message,, saying that the library for the unused terminal cannot be loaded. That is, if you use the MetaTrader 4 terminal, you will get an error message about the R64 library and vice versa.

Alternative:  HLR_HTF_Signal - indicator MetaTrader 5

To debug the “terminal – R” interactioon, you can use DebugVeiw.

The use example is available in file R_Test.mq5.

The source 32-bit library for МТ4 was adjusted to 64-bit for МТ5 by Andrey Voytenko

The library is distributed in accordance with the GPL-2 license, allowing commercial and non-commercial use with the obligatory reference to the source.


📈 ROBOTFX MetaTrader Expert Advisors and Indicators to maximize profits and minimize the risks