Watch how to download trading robots for free
Find us on Twitter!
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 - 156


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.

Submit your code

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

The indicator displaying the level of opening day at any timeframe (less than two hours) with the ability to perform the shift of day start time and consider the presence of Sundays in the chart

The breakthrough system using the XMA_Range_Bands indicator.

Volatility channel is a very interesting alternative to Bollinger Bands.

Financial asset oscillation spectrum

The indicator to determine the trend and its directions.

The indicator gives Stop Loss value for open position on the basis of the XATR indicator.

Digital adaptive XXMA Moving Average represents subtype of Moving Averages with a digital flat-trend filter and is made to separate the angular direction of price movement (trend) from the horizontal (flat) for effective trend trading.

The Heikin Ashi indicator drawn in a separate subwindow with the ability to choose a period

The indicator calculates the Moving Average using a modified algorithm of the linearly weighed Moving Average.

The breakthrough system using the XMA_Ishimoku_Channel indicator.

The Keltner Channel indicator with the added flat area

The Price Channel indicator. It draws the line of high and low price values for the last N bars from high timeframe

The OsHMA oscillator is the indicator of the difference between two HMA (between two Hull Moving Averages).

Class implements neural network of radial basis functions (Radial Basis Function Network - RBFN)