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.

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.

This calculates Optimal f using the Geometric Mean. Per Ralph Vince, "In trading we can count on our wins being for varying amounts and our losses being for varying amounts. Therefore the Kelly formulas could not give us the correct optimal f." So, using his equation(s), I created this library for the Geometric Mean version of Optimal f.

The EasyAndFastGUI library allows creating graphical interfaces for custom MQL programs.

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

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

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.

Library to work with Skype.

Serialization and deserialization of JSON protocol. The code is ported from a high-speed С++ library.

A library for creating icons in the Windows taskbar and for sending text alerts. The use of this library will help you make your MQL programs more informative.

The Dynamic Trend signal indicator draws a two-color trend direction line and adds signal arrows.

A quick way to draw an arc-shaped channel using four mouse clicks.

Class for the calculation of the ENUM_STATISTICS enumeration parameters

Synchronize ОС/EA/MT processes etc. Any self-made DLLs are not needed now.

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

The Trend Detection Index.

CNetMLP provides multilayer perceptron (MLP).

Graphic control for color selection.

RSI that is based on Directional Movement with added filtering and PSAR

Original mathematical functions taken from different places, which either do not have analogues or perform much faster than alternative implementations

This class is designed for creating interactive buttons with various states on a price chart.

The class allows to organize the mini time series, indicator minibuffers, short sized buffers to store intermediate stream data inside the Expert Advisor or indicator.

Usually most brokers do not provide M1 data over 3 months in MetaTrader 4, but they provide M1 data over 3 years in MT5. So we can use this tool to obtain the M1 data in MetaTrader 5 tester and save the data into .hst file for MetaTrader 4 backtesting.

The class to play music using the MIDI device

Fast Trading Panel - the panel for fast trading

This Expert Advisor illustrates the usage of the IndicatorParameters() function to get the information about the number of input parameters, their type and values.

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

Graphic Panel Contest submission.

It's an oscillator of the overbought/oversold market conditions. It can also be used as the Momentum indicator. Triple smoothing is used for removing the cyclic components in price movements with the period less than that of TRIX.

The BykovTrend semaphore signal indicator, which features alerts, sending emails and push-notifications to mobile devices.

Reference Slow Trend Line (RSTL).

Fractal Graph Dimension Indicator

This indicator will plot divergence lines on the Awesome_Oscillator indicator and will give buy and sell signal by displaying arrows.

Linear regression slope normalized to SMA.

Delta ZigZag defines the reversal on a minimal height of the swing and also identifies trend on breakthrough of local minimum/maximum levels and colors zigzag sections in current trend color

The panel for the display of statistical parameters calculated based on the trade history.

The indicator plots the chart of the specified symbol in a separate window.

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.