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

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.


Relative Vigor Index that allows to select RVI and the signal line smoothing algorithms.

ExCandles-v2 indicator shows candlesticks combinations on a chart using the arrows.

Combined power and trend direction indicator.

Symmetric Darvas Boxes for Forex.

Fine Fractals can show important price curves, highs and lows in the cases where the standard Fractals indicator fails.

Darvas trading technique is based on his method of a new trend detection.

An indicator to put correlated currency charts on a given currency chart. It shows only bars currently. Color/monochrome mode is configurable. It also supports currency inversion for handling EURUSD & USDCHF like pairs.

Simple indication of a newly born trend using colored arrows on a chart.

The indicator of the ratio between fast Average True Range (ATR) and slow ATR.

DailyPivot_Shift indicator differs from the common DailyPivot indicator, as the main levels can be calculated with day start shift. This variant of the DailyPivot_Shift_Full indicator can be built for any chart bar and allows to clearly see the market behaviour relative to the indicator levels at each bar.

Standard Commodity Channel Index with the standard average deviation formula and the possibility to select smoothing algorithm and dynamically changing oversold/overbought levels.

ATR Channels create price movement channels considering ATR (Average True Range).

DailyPivot_Shift indicator differs from the common DailyPivot indicator, as the main levels can be calculated with day start shift.

Commodity channel index having possibility to select smoothing algorithm and dynamically changing oversold/overbought levels.

Relative strength index with dynamically changing oversold/overbought levels and the possibility to select smoothing algorithm.

Stalin is one of the so-called «signal» indicators, as it provides a trader with accurate market entry points.

This indicator shows the simple clock in comment.

Schaff Trend Cycle indicator is a cyclical oscillator created by calculating the stochastic over MACD line using cycles. As a result, the developers managed to achieve more stable and reliable results of the indicator script operation.

The indicator generates signals for entering the market.

The indicator that paints the bars in blue for a bullish trend and in red for a bearish one.

Value Charts is a detrended price indicator, it shows the overbought and oversold states using the detrended price extremes.

SuperTrend indicator.

SHI_Channel_true automatically shows Barishpolts dynamic moving channels on a chart.

Simple but demonstrative trend indicator.

Simple and demonstrative indicator of the current trend power and direction.

JFatlAcceleration measures the current trend acceleration.

The indicator shows trend change rate with a minimum lag.

Standard Heiken Ashi calculated using smoothed price time series.

The system of Camarilla Equation levels for all bars.

The system of Camarilla Equation levels for the current bar.

The universal moving average with double smoothing and possibility to select each of this smoothings from the dozen of possible variants.

Four digital filters that form the basis of the V. Kravchuk's AT&CF method in one separate window.

Chaikin Oscillator with a smoothing algorithm selection.

Spearman's Rank Correlation is a non-parametrical method used for statistical analysis of the correlation.

The variant of the ZigZag indicator optimized by its operation rate.

Chaikin Volatility Index determines volatility on the basis of the range width between minimum and maximum. The presented variant of this popular indicator allows to select the smoothing algorithm out of ten possible variants.

The indicator for multi-currency technical analysis based on the related financial assets resonances.

Set of Keltner Channels based on the universal smoothing.

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

Set of Bollinger Bands ® created on the basis of the universal smoothing algorithm.