Watch how to download trading robots for free
Find us on Twitter!
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 - 60

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

An indicator with coloring candlesticks according to B. Williams and alerting on trend change, as well as sending e-mails and Push-messages in such situation.

Indicator OzFX_D1_IndAES_v1.0 with the timeframe selection option available in the input parameters.

Two indicators iMA (Moving Average, MA) and one iRSI (Relative Strength Index, RSI). Many settings and optimization of trade signals formula.

A trading system based on the signals of indicator SilverTrend_CrazyChart.

Trading based on indicator iStochastic (Stochastic Oscillator, Stochastic). Stop Loss, Take Profit, and Trailing of a position can be enabled/disabled.

The EA closes all positions if the equity reaches a certain ratio as related to the balance.

Expert Advisor "Previous Candle Breakdown."

Indicator John Ehlers Trend Component

The EA opens positions at crossing fast iMA and slow iMA (Moving Average, MA). It has the function of outstaying the losses. It catches the type of the position in OnTradeTransaction.

Murrey levels are an efficient tool to forecast the changes in price movement. The main idea of this system is that all markets move in the same manner.

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

Indicator BrainTrend2_V2x10 shows the color of the BrainTrend2_V2 indicator candlesticks from ten different timeframes.

The indicator calculates the inclination angle of the last segment of moving average and shows it in the chart together with the MA line and the line drawn from the last segment of moving average.

Panel indicator with the date on closed positions.

RSI + STARC Bands (Stoller Average Range Channels).

Indicator Volatility_Ratio.

Oscillator TATR (Tick Average True Range).

Two identical trading systems based on the signals of BrainTrend2_V2, for long and short trades, which can be configured in different ways within one Expert Advisor.

Indicator AnalysisOnBars with the timeframe selection option available in input parameters.

Informational indicator AnalysisOnBars shows bars without considering the price. Bars are shown in points.

PDO

Indicator PDO (Percent Difference Oscillator).

Oscillator Notis% V measures the market volatility, based on the difference between the intraday High and Low.

Trading panel based on class CDialog.

Oscillator MACD Squeeze similar to indicator Trade The Markets Squeeze, but based on MACD.

Intraday Intensity Index.

HWC

Channel indicator HWC (Holt-Winters Channel).

Indicator HWMA (Holt-Winter Moving Average) is a three-parameter moving average by the Holt-Winter method.

Indicator of candlestick divergences.

Indicator Difference2 shows the difference between the predefined reference prices (Applied price) now and as of N periods ago.

DI

Oscillator DI (Damping Index) is designed for identifying the damping of the directed market movement.

A slightly modified EA from the standard delivery: MQL5\Experts\Examples\Moving Average\Moving Average

Working with pending orders Buy Stop and Sell Stop. A channel of two indicators iMA (Moving Average, MA).

Indicator BrainTrend2Stop with the timeframe selection option available in input parameters.

Indicator BrainTrend2 that generates alerts and sends e-mails and Push-messages when the indicator changes its color.

Positions are opened pseudorandomly. In case of loss (closing by Stop Loss and negative profit), Martingale is applied.

The inverted chart of the current financial instrument, displaying Ask and Bid price levels.

Indicator AnchoredMomentum_x10 shows the location of indicator AnchoredMomentum from ten different timeframes.

A trading system based on the signales of indicator ATR_Normalize_Histogram

Indicator ATR_Normalize_Histogram with the timeframe selection option available in input parameters, alerting when the overbought/oversold zones are broken through.

A typical oscillator using Average True Range in form of a multicolor histogram.

1...535455565758596061626364656667...183