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

MQL5 Source Code Library for MetaTrader 5 - 82

This is the largest free source code library for MetaTrader 5 platform programs. Here you can find ready-made Expert Advisors, technical indicators, scripts and libraries. Use the code library when learning MQL5 language and develop your own automated trading applications based on the provided codes.

You can freely download and test published codes, as well as launch them in MetaTrader 5. The library is also available directly from MetaTrader 5 platform and MetaEditor development environment.


Custom instrument of the linear regression. LR line, Support and Resistance lines values are in the buffers

Trading system drawn on the basis of the signals taken from the OsHMA histogram.

A semaphore, signal indicator drawn on the basis of the values ​​of the Accelerator of Bill Williams with sending alerts, push-notifications and e-mail messages

The indicator of Peak Price Values.

The X2MA Moving Average turned to the oscillator using the normalization of its values in the range from 0 to 100.

This indicator displays the market activity in percentage

A volatility indicator displays the amount of the corridor price movements for N period in points

The Aggressiveness indicator displays how many points the instrument runs on the average for one candlestick

Four parabolic indicators at one time!

The class realizes generalized regression network (General Regression Neural Network - GRNN)

The class realizes the probabilistic neural network (Probabilistic Neural Network - PNN)

ATR MA Oscillator is the oscillator drawn on the basis of the difference between the ATR oscillator and its signal line.

The indicator displays the historical volatility value

The Expert Advisor is drawn on the basis of changing the direction of the MovingAverage_FN (digital hybrid and analog filtering indicator).

Fractals with the ability to set range

The Kagi chart is drawn on the main window of the currency pair and a considering timeframe

A Moving Average hybrid of digital and analog filtering.

The ZigZag drawn using Heikin Ashi extremums

Trading system using the Exp_ColorJVariation oscillator.

The linear regression channel indicator drawn on the indicator buffers

The channel drawn on the basis of a parabolic

Trading system using the ColorStepXCCX indicator.

The "Trader assistants" series indicator drawn on the basis of two Moving Averages and the RSI

The sound signal which triggers that a new bar appeared

The principle of this indicator is based on the RSI oscillator using divergence and convergence

Trading system using the crossing of the XRVI oscillator with its signal line.

This indicator displays day price change in percentage for four selected financial institutes

The indicator to define the trend and the flat.

The indicator displays the dominant force of market movement (bulls-bears) to the volume

Trading system using the ColorMETRO indicator

The Kagi chart drawn in a separate subwindow

The chart of (three) linear breakthrough in a separate subwindow

The Exp_ColorNonLagDotMACD Expert Advisor drawn on the basis of the signals taken from the ColorNonLagDotMACD histogram

Trading system using the AML trend Moving Average

The IndMATEMA indicator is based on crossing of two MA and two TEMA on close and open prices of bars.

The trading system based on crossing of the DI+ and DI- lines of the ADX_Smoothed indicator

The XMA_Range_Bands indicator variant which can be placed by fixing timeframe of the indicator on a value different from the chart timeframe.

The breakthrough trading system using the 3XMA_Ishimoku indicator.

Financial asset oscillation spectrum normalized by values of a simple Moving Average

The Expert Advisor is a profit calculator on the opening position for price movement to a price level fixed in the chart