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


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

Smart Money Pressure Oscillator

A slow stochastic with a histogram.

Weight Volume Move-Adjusted Moving Average.

Indicator Wiseman with the timeframe selection option in its input parameters.

An indicator of the volume / bar price range ratio with a signal line and with the option of identifying the maximum/minimum price change resistance.

Indicator of candlestick size / tick volume ratios and signal line.

Indicator of candlestick size / tick volume ratios.

A candlestick size indicator.

A colored tick-volume indicator.

Wiseman is an indicator basically aimed at showing the candlestick, on which the trend has changed its direction.

Indicator Kalman Filter. It allows efficiently smoothing the noise, extracting the main trend from it.

The oscillator shows standard deviation calculated on the difference between the High and the Low.

Two channels by the High and Low of MA.

Indicator of the difference between ADX and ADX as of N periods ago.

Oscillator ADMIR (Average Directional Movement Index Rating) shows the ratio of the ADX lines of two indicators Average Directional Movement Index with the calculation periods differing by the specified value.

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

An indicator to pull trailing stops with the channel color background filling and showing the latest values as price labels.

The Exp_CandlesticksBW_Tm Expert Advisor is based on the color change of the CandlesticksBW candlesticks and allows strictly define the trading time interval.

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

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

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.