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

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

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

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.

1...293031323334353637383940414243...160