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 - 172


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

Murrey Math Lines for the current bar are an effective tool for the market movements forecasts.

Conjunto de Bandas de Bollinger ® criado com base no algoritmo de média universal.

The color histogram based on the Momentum and Perry Kaufman's Adaptive Moving Average indicators.

This indicator based on the digital filter shows trend direction.

Multi-currency trend following expert system using the Triple Exponential Moving Average technical indicator.

The indicator displays MACD histogram and price divergence on a chart.

More smoothed Momentum with colored indication of the current trend.

This indicator paints the candlesticks in different colors depending on a trend power and direction.

The indicator shows market entry points as colored dots. Signal dots locations can indicate the levels for setting a protective Stop Loss or a new Trailing Stop position.

The indicator helps to compose a picture of market future movements, in distinct from the other tools that hang behind the market. The information that became available in the course of the previous day is used to calculate the check points of the minor trend of the current day.

The DailyPivot Points indicator helps to compose a picture of market future movements, in distinct from the other tools that hang behind the market.

Variation Index shows if a trend or a flat movement is prevailing in the time series or random behaviour.

The indicator consists of five Tirone Levels that are, in fact, support and resistance levels based on a trading range for a certain period of time.

The indicator consists of support and resistance levels based on a trading range for a certain period of time.

New comments added to a chart without deleting existing ones.

The simple indicator which displays minimums and maximums of the eldest, middle and short periods using semaphore dots.

The indicator generates buy and sell signals using colored dots on a chart and displays messages.

Yaanna is the simplest indicator of the overbought/oversold states.

Symmetrical normalized CCI (Commodity Channel Index) with alternative (ultralinear and JMA) smoothing algorithms.

The indicator is a combination of the FATL digital filter and analogue JMA adaptive smoothing.

Range Bound Channel Index (RBCI) digital filter removes low frequency trend, generated by low frequency spectrum components, and high frequency noise, generated by high frequency spectrum components.

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

Slow Adaptive Trend Line is used for suppressing market noises and market cycles with longer oscillation periods.

The indicator generates buy and sell signals and issues alerts in case of the Stochastic Oscillator indicator overbought or oversold levels crossing.

Using JMA adaptive moving average is the best way to smooth price ranges with a minimum time lag.


The simplest trend indicator.

Extrapolator is a result of a long-term research in the field of Timeseries Forecasting. This indicator forecasts future price behavior.

Slow adaptive trend line with ultralinear and JMA smoothings.

2pbIdeal1MA.mq5 and 2pbIdeal3MA.mq5 indicators are the moving averages with the smoothing algorithm developed by Neutron.

The indicator generates market entry signals and draws the line of Stop Loss orders positioning.

Reference Slow Trend Line (RSTL).


While creating Kairi (KRI) oscillator, deviation of a price from its simple moving average is calculated. The result is shown in percentage of the average.

Moving average indicator with the linear regression smoothing algorithm.

RSI oscillator with ultralinear and JMA smoothing algorithms.

Reference Fast Trend Line (RFTL).

The fan based on the five T3 moving averages for trend indication.

Moving average indicator based on parabolic approximation of price.

In this MACD histogram the JMA smoothing is used instead of the standard smoothing.

RSI indicator applied to MACD clearly shows the current price divergence.

PCCI (Perfect Commodity Channel Index) is a high frequency part of the price fluctuations normalized using the standard deviation.