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

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.

latest|best

Crossing of the two iMAs.

Waddah_Attar_Trend indicator features alerts, emails and push notifications.

The Expert Advisor increases the volume of an open position if profit in points from the last trade increases a threshold fixed in the EA inputs.

The Expert Advisor moves a stop loss to a predefined fixed distance from the current price.

Scalpel EA for MetaTrader 5

The Expert Advisor opens trades when the price approaches an integer cent, for example, 1.39, 1.40 or 1.41.

The Expert Advisor moves a position to a breakeven when a predefined profit is reached.

SilverTrend semaphore signal indicator features alerts, emails and push notifications.

The Expert Advisor opens and closes positions at the predefined moments in time.

Non-indicator system based on the analysis of the four previous bars. Implemented partial closing.

The Exp_CenterOfGravityCandles Expert Advisor is based on signals of the CenterOfGravityCandles indicator.

The WPR_Histogram_Round indicator with the timeframe selection option available in the input parameters.

This Expert Advisor closes all positions if the total loss/profit exceeds a predefined limit.

The Expert Advisor is based on a standard trend strategy and the two-layer neural network that is trained to enter the market against a trend.

The MFI_Histogram_Round indicator with the timeframe selection option available in the input parameters.

This Expert Advisor closes all positions if the total profit exceeds a predefined limit.

This Expert Advisor closes all positions if the total loss exceeds a predefined limit.

The indicator shows the price chart of any scaling level.

Analyzing iBullsPower and iBearsPower indicators on the first bar.

Ehlers Center of Gravity indicator in the form of candles.

The trading system based on the three RVI oscillator signals from three different timeframes.

The trading system based on the three Stochastics signals from three different timeframes.

Open and close at a certain time. A trade having a specified volume is opened at a specified symbol. Select position type: Buy or Sell.

The Expert Advisor using artificial intelligence - a single-layer neural network. The "Perceptron" is used for identification of the quotes movement direction. Both iAC indicator and CopyTime calls are used.

Receive data from two indicators: iStochastic and iWPR.

e-Regr — MetaTrader 5 Expert Advisor. Trading by i-Regr (Regression Channel). Extensive use of the standard library classes.

The indicator plots price channel and Fibonacci levels based on the latest Zigzag2_R_Color peaks.

The RSI_Histogram_Round indicator with the timeframe selection option available in the input parameters.

Standard WPR oscillator implemented as a histogram rounding its values to the standard range.

BrainTrend2Sig semaphore signal indicator features alerts, emails and push notifications.

Standard MFI oscillator implemented as a histogram rounding its values to the standard range.

The indicator plots price channel and Fibonacci levels based on the latest parabolic ZigZag peaks.

i-Regr is a MetaTrader 5 indicator. Regression Channel: Linear Regression Channel, Quadratic (Parabolic) Regression Channel, Cubic Regression Channel.

Extensive use of the standard library classes.

The extensive use of standard library classes and the uniform code for data acquisition from iMACD, iStochastic, iSAR and iMomentum indicators.

CyberiaTrader is a MetaTrader 5 Expert Advisor.

Exp_X2MA_Digit_DM_361 trend-following trading system is based on ColorX2MA_Digit and ColorDM_361 indicator signals.

Standard RSI oscillator implemented as a histogram rounding its values to the standard range.

ZPF indicator with the timeframe selection option available in input parameters.

The Zigzag2_R_Color indicator with the timeframe selection option available in the input parameters.

1...192021222324252627282930313233...115