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


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

Shows the time left before a candlestick closes

A standard linear regression channel with support and resistance levels

The simplest moving-like indicator

A simple trend indicator in the form of a colored cloud

The indicator predicts the possible reversal points

The original indicator that shows buy and sell signals of three indicators on nine timeframes

The indicator paints the part of the bar depending on the direction of the candlestick

One of the variants of a simple moving average of close prices, which automatically adapts to the chart period and shows the average value of the price for each of the 21 ranges provided in MT5. Comparing the current price with the average price value for a particular trader selected period.

The MACD histogram drawn on the basis of the RSI smoothed oscillator

Extended version of the normalized volume indicator. Added tools that simplify the visual analysis of the indicator values

The NRTR trend indicator that sends alerts and Push messages

The trend indicator drawn in the form of the cloud

The indicator draws candlesticks when finding the CCI indicator in the overbought and oversold levels

The entropy indicator performed in the form of the MACD colored histogram.

Daily Fibo support and resistance levels in the leverage from -300% to +300%. There are 36 levels plus pivot in total

The indicator draws the boundaries of the calendar day for trading by Larry Williams

This indicator is based on the idea of that an unusual impact in price changes will be adjusted by an inverse reaction.

The MA will automatically recalculate the period if there are any changes in time frame.

Didi Index mql5 source code.

Trading strategy based on ASCTrend indicator as main signal, filtered by NRTR indicator and/or by TrendStrength indicator.

A variant of the SSL indicator performed in the form of the channel and represented as the colored cloud with the filling of alerts when the direction of the trend changes

Variation on the theme MACD, using the colored bars as the signals of entry and exit.

The volatility indicator


A semaphore signal indicator that uses two Moving Averages in the form of NRTR

A modified Camarilla dt Historical indicator

Conversion from MetaTrader 4 version.

The indicator automatically draws Fibonacci lines by yesterday's or today's range

The channel ZigZag

Trading system using the XMUV and MUV_NorDIFF_Cloud indicators.

The indicator draws horizontal lines on the level of last fractals up and down.

The trend reversal indicator

NRTR is Nick Rypock Trailing Reverse indicator.

Support and resistance levels drawn by the day charts

The script for searching the maximum, minimum and average values of candlestick size

The fast trends indicator drawn on the basis of two normalized XMUV Moving Averages.

The fast trends indicator drawn on the basis of two normalized XMUV Moving Averages.

The fast trends indicator.

The simple, smoothed, less lag indicator drawn on the principle of the smoothed shift using the EMA price by increments of the first 3 orders

Use of the Lagrange polynomial interpolation to predict the future price

The redrawing oscillator drawn on the basis of the SSA.mqh singular transformation library of functions