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


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

Indicator - trading system "FX Fish 2MA".

The indicator colors candlesticks depending on the trend direction.

An Expert Advisor based on iRSI (Relative Strength Index, RSI).

The indicator colors candlesticks depending on the position of these candlesticks in relation to the previous candlesticks.

The BBands Stop v1 indicator provides alerts, sends email and push notifications when the trend direction changes and the indicator color changes accordingly.

This indicator is based on MFI (Money Flow Index) and its multiple signal lines analysis.

The TD_I indicator (Thomas DeMark Indicator) is a modified version of the standard DeMarker Indicator by Thomas R. DeMark.

A trading system based on iMA (Moving Average, MA) with the averaging period of 55 (the averaging period is hardcoded and is not available in input parameters).

The SVE_ARSI (Sylvain Vervoort's Asymmetrical RSI) indicator was described in the October '08 issue of the "Stocks & Commodities" magazine.

The Demand_Index indicator developed by James Sibbet combines the price and volume, and is often considered a leading indicator of price change.

The Chandelier Exit indicator implemented as a sequence of candlesticks

Super SAR is a signal indicator based on SuperTrend and iSAR.

An Expert Advisor based on the iMA (Moving Average, MA) indicator.

The Mirror MA indicator features two mirrored moving averages in a separate chart window calculated based on a difference between two MAs with different calculation data, and one signal line calculated based on a direct moving average data.

One of the variations of the "Avalanche" strategy. Martingale is used.

Klinger Oscillator developed by Stephen Klinger to determine the long-term trend while remaining sensitive to detect short-term fluctuations enabling the trader to predict short-term reversals.

The Dynamic Trend signal indicator draws a two-color trend direction line and adds signal arrows.

A trading system based on the ColorXPWMA_Digit indicator signals with an ability to change the volume of a forthcoming trade depending on the results of the previous trades for this trading system.

The Trend_Intensity_Index indicator with the ability to change the indicator timeframe using the input parameters.

The Trading_Channel_Index indicator with the ability to change the indicator timeframe using the input parameters.

The ColorXPWMA_Digit indicator with the ability to change the indicator timeframe using the input parameters.

The ColorXPWMA_Digit indicator with additional trend strength indication using colored dots based on the standard deviation algorithm.

The Dinapoli Preferred Stochastic indicator uses the smoothing method described by Joe DiNapoli, which differs from the standard stochastic.

The indicator DHLPBO (Dynamic High/Low Percentage Band Overlay). Unlike DHLBO, which displays two bands calculated based on the Highs/Lows of the range, this indicator constantly narrows the channel width by a certain percentage throughout the whole range.

The DHLBO (Dynamic High/Low Band Overlay) indicator shows on the price chart two bands calculated based on the range Highs/Lows.

Deviation Oscillator - a volatility oscillator which represents a difference between the price and the MA, normalized within the selected range.

The Delta Oscillator indicator displays the difference in the Delta indicator lines as a histogram.

The Delta indicator draws two lines: the bar average price line (OHLC)/4 and the line of the decimal logarithm of the current to previous (OHLC)/4 prices ratio.

A channel filter indicator Darvas Box.

Damiani Volatmeter - trend/flat determining algorithm.

The TriggerLines trend indicator draws two moving average lines colored in accordance with the trend direction: green for upward and red for downward.

Twiggs Money Flow is an indicator by Colin Twiggs, which uses Welles Wilder's Moving Average.

A signal indicator YABSI. It shows Buy and Sell labels on the price chart.

WMAO (Wilder's Moving Average Oscillator) - an oscillator based on Welles Wilder's Moving Average.


The Wilder's Smoothing Average (WMA) indicator.

The signal and information indicator Williams Thrust is based on two Williams' Percent Range indicators with different periods and their average values.

The VPCI (Volume Price Confirmation) indicator shows the relationship between the price and the volume.

The STPMT (Medium Term Weighted Stochastics) indicator.

An Expert Advisor based on the iWPR (Williams' Percent Range, %R) indicator with the operation time control.

The Trading Channel Index oscillator displayed as a color histogram.