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

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

The Modified Moving Average indicator

The MA signal indicator

The Investor Preference Index indicator

The Commodity Channel Index oscillator displayed as a color histogram, using volumes.

GD

The Generalized DEMA moving average

The Relative Strength Index oscillator displayed as a color histogram, using volumes.

A trading system based on the Trading_Channel_Index oscillator signals.

A trading system based on the Trend_Intensity_Index oscillator signals.

The Forecast oscillator indicator

Fractal Graph Dimension Indicator

The Derivative Oscillator indicator

The Center of Gravity Channel indicator

Three independent trading systems using ColorXPWMA_Digit indicators within a single EA with an ability to change the volume of a forthcoming trade depending on the results of the previous trades for this trading system

A trading system based on the UltraMFI 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 i-AnyRangeCldTail_System indicator provides alerts, sends email and push notifications when the candlesticks break through the dot-dash channel.

The indicator paints candlesticks, which are beyond the i-AnyRangeCldTail channel. Candlesticks outside the channel limits are marked with color according to the trend.

A modification of the "Bears Power" indicator: now the line color and line width can be set in input parameters.

A modification of the "Bulls Power" indicator: now the line color and line width can be set in input parameters.

A modification of the "Custom Moving Average" indicator: now the line color and line width can be set in input parameters.

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

An indicator of ranges of arbitrary time intervals with the extension of the interval generated within the specified session until the next session.

An indicator of ranges of arbitrary time intervals.

This Expert Advisor doesn't use any indicators. It only applies analysis of Close prices at bar #1 and the specified bar.

A trading system based on the FX Fish 2MA indicator.

An indicator of two ranges of arbitrary time intervals.

A trend indicator based on the difference between two moving averages.

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.