Download MetaTrader 5

Watch how to download trading robots for free

Find us on Facebook!
Join our fan page

Access the CodeBase from your MetaTrader 5 terminal

Couldn't find the right code? Order it in the Freelance section

How to Write an Expert Advisor or an Indicator

Top MQL4 and MQL5 source codes based on user ratings


ALGLIB math function library (v. 3.5.0) ported to MQL5.

Graphic control for color selection.

An indicator of technical shapes by Merrill. М & W Wave Patterns by A. Merrill.

The library that contains various statistical functions including the calculation of an average value, variance, asymmetry, excess, covariation, correlation etc.

New CCalendarInputBox control element of the IncGUI library has been designed for date and/or time input.

Calculation of 32 digit string MD5-hash from transmitted byte array

Sometimes this is useful - to observe the behavior of the oscillator in the channel. Greatly simplifies the evaluation of the situation.

Trade signals based on "Morning Star/Evening Star" candlestick patterns, confirmed by Relative Strength Index (RSI) indicator is considered. The code of the Expert Advisor based on this strategy can be generated automatically using the MQL5 Wizard.

A script for placing two Buy and Sell Stop orders at an equal distance.

Double smoothed stochastic with some extra options

The indicator is an example of smoothing a time series of the ADX indicator by filtering harmonics of higher order.

CAMAOnArray class is designed for calculation of AMA (Adaptive Moving Average) values on indicator buffers. The example of use of the class is provided.

The spread_on_chart indicator shows the current values of spread, stop and freeze levels.

The Williams’ Percent Range Indicator (%R) is dynamic technical indicator, which determines whether the market is overbought/oversold.

Trading signals module for MQL5 Wizard. The moment, when NonLagDot indicator changes its color, indicates the time for market entry.

This library allows to automate the process of connecting to a trade server after the "Account disabled" error occurs.

This library will allow you to tranfser realtime quotes from MetaTrader 5 to external server application.

Moving average with the double adaptive JMA smoothing of a price range.

The Exp_ChandelExitSign_ReOpen trading system based on the signals of the ChandelExitSign indicator with trend following scaling.

T3 with floating levels

The i-CAiChannel_System_Digit indicator with the timeframe selection option available in input parameters.

Library to work with Skype.

Balance of market power (using improved Jurik filter for calculation).

To demo buffer-pattern: Candles + Fractals + ZigzagColor + ColorMaLine.

An indicator lets you specify the number of bars separately before and after the current High / Low (fractal) can.

Many traders are interested in native work with the BTC-e exchange directly from MetaTrader. In the exchange API, it is necessary to send data with the confirmation of parameters validity through HMAC-SHA512. The algorithm of SHA512 and HMAC calculation is implemented in this class.

The class can be used for creation of trade signal classes with reversal candlestick patterns.

The Binary Wave returns a positive or a negative value depending on how the indicator readings are interpreted.

Enhance your charts by adding intelligent markers for important price points and the start/end of year/month/week/day/session Includes a price pointer that changes color whenever price is near an important price point (e.g. historical high/low)

Volume Profile + Range v6.0 (former TPO). Distribution of deals by price levels at a given time interval. Displayed as a histogram.

Perry Kaufman's adaptive moving average with indicative signal points.

The On Balance Volume Indicator (OBV) is a momentum technical indicator that relates volume to price change.

Trade signals based on "Morning Star/Evening Star" candlestick pattern, confirmed by Stochastic indicator is considered. The code of the Expert Advisor based on this strategy can be generated automatically using the MQL5 Wizard.

An example of determining the moment when a pending order has triggered.

The Cronex T RSI BBSW indicator for MetaTrader 5.

The Expert Advisor enables and disables the "AutoTrading" button at a certain time and closes all opened positions on the account once the specified period of time expires.

A script for placing a SellStop order

Fractal Average Directional Index.

Parabolic SAR that avoids some of the problems of existing PSAR-indicators and calculates the values correctly.

The indicator shows a text block with the values ​​of the user defined RVI oscillator period for each timeframe.