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

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

XCCI_Histogram_Vol indicator shows direction of the histogram bars movement using colored icons on these bars

CCI_Candle_Vol indicator with additional averaging of the resulting candles

RSI_Candle_Vol indicator with additional averaging of the resulting candles

Flat/trend indicator.

EA based on FlatTrend indicator. You can also include working time.

TrendManager indicator with the timeframe selection option available in input parameters

Defining a signal based on several indicators: iMA (Moving Average, MA), iMACD (Moving Average Convergence/Divergence, MACD), iStochastic (Stochastic Oscillator), iOsMA (Moving Average of Oscillator, OsMA) and iAO (Awesome Oscillator, AO). The indicators are surveyed in a certain sequence.

The Expert Advisor sets pending Buy Stop and Sell Stop order at a specified time.

iDeMarker (DeMarker, DeM) indicator averaging using MovingAverages.mqh

The trading system based on XCCI_Histogram_Vol indicator signals

The trading system based on the signals of the XRSI_Histogram_Vol indicator

XRSI_Candle_Vol indicator showing a breakthrough of its zero line using candles, color labels and audio signals

The EA is based on iAO (Awesome Oscillator, AO) and RAVI (Range Action Verification Index) indicators.

The EA is based on the intersection of two iMAs (Moving Average, MA) but with an additional filter: price from ENUM_APPLIED_PRICE

XCCI_Histogram_Vol_Direct indicator with the timeframe selection option available in input parameters

XRSI_Histogram_Vol_Direct indicator with the timeframe selection option available in input parameters

The trading system based on the Iin_MA_Signal 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

Iin_MA_Signal indicator in NRTR form

Trading strategy based on iAMA (Adaptive Moving Average, AMA) and iRSI (Relative Strength Index, RSI) indicators. Martingale is applied.

The trading strategy based on two oscillators: iCCI (Commodity Channel Index, CCI) and iRSI (Relative Strength Index, RSI).

The trading system based on XRSI_Histogram_Vol_Direct indicator signals

The trading system based on XCCI_Histogram_Vol_Direct indicator signals

Iin_MA_Signal_NRTR indicator with the timeframe selection option available in input parameters

"Previous Candle Breakdown" Expert Advisor.

Iin_MA_Signal indicator displaying the current trend using candles color

The trading system based on TrendManager indicator signals with the possibility to set a fixed position holding time

NRTR type trend indicator based on exiting the channel formed by averaging High and Low of the price series

Stop loss and take profit initial setting. Trailing.

DeMarker_Histogram_Vol indicator with additional averaging of the resulting histogram

Trading system based on iADX (Average Directional Movement Index, ADX) and iAMA (Adaptive Moving Average, AMA) indicators. The system works on a new bar only.

The trading system is based on a simple neural network.

The indicator of expanding time zone corridors

HullTrend indicator with additional smoothing of the Hull moving average and rounding the values by the number of digits fixed in the input variables

The Expert Advisor based on iBullsPower (Bulls Power) and iBearsPower (Bears Power) indicators.

DeMarker_Histogram_Vol indicator with the timeframe selection option available in input parameters

The indicator of expanding time zone corridors with two corridors

Analyzing the price channel (iHighest, iLowest) for a certain period of bars.

The Expert Advisor based on ZigZag.

The channel formed on an open price of an hour set in the settings

The Expert Advisor based on iCCI (Commodity Channel Index, CCI) indicator.

123456789101112131415...150