Download MetaTrader 5

Watch how to download trading robots for free

Interesting script?
So post a link to it -
let others appraise it

You liked the script? Try it in the MetaTrader 5 terminal


mt-R - library for MetaTrader 5

| English Русский 中文 Español Deutsch 日本語 Português

Published by:
СанСаныч Фоменко
votes: 24
2017.03.02 12:08
mt_R.ZIP (231.14 KB)

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:


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.

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.

Translated from Russian by MetaQuotes Software Corp.
Original code:

5_8 MACross 5_8 MACross

The Expert Advisor trades by two iMA (Moving Average, MA) indicators. Trailing Stop. TrailingStop

Kijun Sen Robot Kijun Sen Robot

The Expert Advisor uses the following indicators: Ichimoku, MA, SAR. Optimized for currency pairs: GBPUSD and EURUSD with the M30 timeframe. The full description is available in the code.


A simple trend indicator of the oscillator type.

SmoothAlgorithms SmoothAlgorithms

A library of averaging algorithms, the algorithms were described in details in the article "Averaging Price Series for Intermediate Calculations Without Using Additional Buffers"