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

icon

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
latest | best
PCI

Indicator Phase Change Index - the market phase change index

Moving averages on charts M5, M15, H1 are analyzed. The presence of the iMA (Moving Average, MA) "fan" is checked simultaneously on all three charts (M5, M15, and H1).

This utility tracks positions opened manually or by another EA for the current symbol and opens an opposite position. Opening the positions is tracked in OnTradeTransaction.

A trading system that only trades on resverse and from Thursday to Friday only.

An Expert Advisor based on two indicators iMA (Moving Average, MA). At crossing, we move back from the price at a certain distance and then expect the level obtained to be broken through.

Working with indicator iMA (Moving Average, MA) with a rigidly defined timeframe: D1.

iMACD (Moving Average Convergence/Divergence, MACD) with adjustable timeframes and a Stochastic of the current timeframe.

An Expert Advisor based on two indicators iMA (Moving Average, MA).

In CCI T3 Base indicator average is replaced with T3 and the deviation is replaced with EMA deviation.

This indicator is a Schaff Trend Cycle that is using Jurik Volty Adaptive RSX for calculation. Default adapting period is kept rather long simply to make the effects of the adapting more noticeable.

TEMA Jurik Volty Adaptive is using Jurik Volty for making the TEMA adaptive.

DEMA Jurik Volty Adaptive is using Jurik Volty for making the DEMA adaptive.

EMA Jurik Volty Adaptive is using Jurik Volty for making the EMA adaptive.

Jurik Volty Multi Timeframe indicator is calculating and showing periods of elevated or lesser volatility as a standalone indicator.

Jurik Volty indicator is calculating and showing periods of elevated or lesser volatility as a standalone indicator.

Hikkake Pattern (Inside Day False Breakout) indicator is a trading strategy based on false breakouts. Translated into MQL5 code from Dan Chesler's article published in April 2004, Active Trader Magazine "Trading False Moves with the Hikkake Pattern".

Pivotal points as described in the March 2009 SFO magazine article "Trading FX Like Jesse Livermore Traded Stocks" by Jamie Saettele.

An indicator for displaying ATR (Average True Range) value in pips or points with option for setting multiplier.

Compared to the CCI Squeeze indicator, this version is a standalone multi timeframe version (no other indicator is needed for its work).

Combination of two very well known indicators (CCI and Moving Average) that estimates the direction strength of the current market trend.

Compared to the Step Chart indicator, this version displays the values in a separate window (as a sort of a help to see the trend changes in an easier way).

Compared to the Step Chart indicator, this version displays the values in a separate window as a histogram (as a sort of a help to see the trend changes in an easier way).

Step Chart indicator monitors the price change (in pips) and according to that, determines if a new "step" has been made or not.

Volatility Pivot indicator calculates "pivots" (support/resistance lines) based on current symbol/timeframe Average True Range calculated volatility.

Compared to the Dollar Index indicator, this version is a bit different: instead of showing just one value, it is displaying the "open", "close", "high" and "low" of dollar index as candles in a separate window. That way you can see the volatility of the dollar index intra bar change too and it displays values closer to our normal assumption how the index is formed.

The U.S. Dollar Index (USDX, DXY, DX) is an index (or measure) of the value of the United States dollar relative to a basket of foreign currencies, often referred to as a basket of U.S. trade partners' currencies. The Index goes up when the U.S. dollar gains "strength" (value) when compared to other currencies.

The Repulse Multi Timeframe indicator measures and displays the bullish or bearish pressure associated with each price candlestick in the form of a curve.

In this indicator Jurik MA is sigmoidal (Softmax) normalized - made as oscillator that ranges in 0 to 1 range, and if you use hyperbolic normalization it will range from -1 to +1 range.

The Repulse indicator measures and displays the bullish or bearish pressure associated with each price candlestick in the form of a curve.

In this indicator T3 is sigmoidal (Softmax) normalized - made as oscillator that ranges in 0 to 1 range, and if you use hyperbolic normalization it will range from -1 to +1 range.

The five-week and 17-week RSI values are used for entry and exits while the 17-week RSI is used for trend direction as an entry filter in the retracement entries.

A trend-following trading system Exp_Sinewave2_X2 is based on the signals of two indicators Sinewave2

Indicator SilverTrend_x10 shows the color of the SilverTrend indicator candlesticks from ten different timeframes from the bar defined in the indicator input parameters.

Indicator MultiSilverTrend_x10 shows information on the current trends, using the colors of indicator SilverTrend from ten different timeframes.

Indicator Sine Wave with the timeframe selection option available in input parameters, in form of a colored cloud.

Two identical trading systems (for long and short positions) based on the signals of indicator SilverTrend, which can be configured in different ways within one Expert Advisor.

Indicator SilverTrend_Signal that generates alerts and sends e-mails and Push-messages when the indicator changes its color, implemented as candlesticks. Candlesticks with the trend are colored brightly, and those against the trend are colored darkly.

Indicator SilverTrend_NRTR with the timeframe selection option available in input parameters, alerting and sending e-mails and push-messages when the indicator changes its color.

A simple RSI with a channel and signal arrows

Smoothed Smart Money Pressure Oscillator

1...454647484950515253545556575859...176