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

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.

To post a new code, please log in or register

Mikahekin can be called a complete analytical block rather than just an indicator. The color of bars shows a trend direction and their height indicates a trend power. Blue and magenta dots show trailing-stop levels for long and short positions, respectively.

i-Regression Channel generates regression channel.

Hull Moving Average (HMA) that can change its color.

Cyber Cycle high-frequency filter.

Autotrendlinien generates a channel in the direction of an existing trend.

The indicator generates continuous lines of the relative average bullish and bearish power.

ZigZag indicator allowing to set Fibo levels at two last extremums.

Instantaneous Trendline shows buy and sell signals, while crossing the moving averages.

The indicator marks possible trend reversals.

Range Expansion Index (REI) is an oscillator that measures price changing rate and signals about overbought/oversold areas, in case a price shows weakness or strength.

Swing Index is a math expression of the operations activity for the last two bars.

The Mass Index is intended for detection of trend reversals based on changes in the bandwidth between the highest and the lowest prices.

The current time position in relation to the beginning and the end of the bar is shown. In addition the ratio between the time passed since the beginning of the bar and the whole bar duration expressed in percents is given. It is useful for choosing the moment of making a trade decision.

Smoothed candlestick chart.

Ease of Movement technical indicator is used to display the ratio between prices change rate and market volume.

Stochastic RVI is a standard Stochastic Oscillator applied to the values of RVI (Relative Vigor Index) indicator instead of a price.

Automated Trading Championship 2011 version.

The indicator builds the trajectory of the front linear regression and standard deviation points.

SuperTrend trend indicator.

This ZigZag indicator is based on the Parabolic SAR technical indicator.

The Demand Index combines price and volume in such a way that it is often a leading indicator of price change.

Superposition of RSI and DeMarker technical indicators.

Range Action Verification Index trend indicator.

The library provides simple matrix operations: addition, subtraction, multiplication, inversion.

The indicator that calculates the volume corresponding to MA per second (or period).

The Mass Index was popularized by Tushar Chande and Donald Dorsey.

Colored Klinger Volume Oscillator with the possibiilty to select smoothing algorithms out of ten possible variants.

BB XMACD is a simple MACD indicator variation.

Standard colored MACD histogram allowing to select smoothing algorithms from ten possible variants and containing alerts.

This indicator determines trend power and direction.

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.