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

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.


The "on chart" version of double smoothed stochastic.

Double smoothed stochastic with some extra options

The version of Aroon oscillator, displayed on the main chart.

The version of Aroon indicator that displays colored line, bars or candles on the mains chart.

The Aroon indicator in the new visualization.

The auto envelope automatically sizes channels by calculating a standard deviation for the last n bars.

This version is an attempt to normalize MACD in known bounds

The normalizing velocity, using by default a gradient coloring.

The MetaTrader 5 version of RSI of MACD double

One more version that draws the parts when the slope is in accordance with trend.

This is an combination of 3 separate indicators: TTM wave A, TTM wave B and TTM wave C.

This version is using double smoothed ema, not some regular moving average.

The gradient version of double smoothed EMA indicator.

This version of RSX allows you to use instead any momentum length.

Dynamic Momentum Index

The multitimeframe version of Donchian channel.

Stochastic that is using RSX as an input for calculations.

Adapting is done using standard deviations.

One more average/smoother that due to its fractional calculation period possibility can be used to be made adaptive.

The second version of indicator with added features.

Hull moving average with arbitrary weights of calculation.

Adaptive super smoother is used for price pre-filtering before it is used to calculate a stochastic

Variable length super smoother with an addition of gradient coloring.

The T3 using standard deviations to make it adaptive

Rapid RSI with adaptive T3 price pre-filtering

This indicator calculate angle of averages using ATR-approximation.

Absolute strength of averages. It is upgraded to use the possible 18 types of averages in calculation.

Simple visualization of Aroon oscillator.

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

This is a trading sessions indicator.

This indicator shows vertical and horizontal lines that you can set in different ways.

Candle Timer shows the time remaining until the end of the candle.

Multi pass averages MetaTrader 5 version is similar to multi weighted MA but this one allows the additional 16 types of averages instead of using just LWMA.

This is a Ehlers inverse fisher transform with an addition of choices of different rsi calculations that can be used.

Gaussian Filter for apply to other indicators too.

Super trend indicator with 18 possible averages for calculation.

Super trend indicator that uses hull average for calculation.

Draws equidistant horizontal lines.

RSI that is intended to be used as a filter.

The CCI pre-filtered indicator with an addition of 18 possible types of averages that can be used for pre-filtering.