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

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

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

Semaphore signal indicator SilverTrend with the NRTR line of possible stop order locations.

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.

1...202122232425262728293031323334...151