Watch how to download trading robots for free
Find us on Telegram!
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 Codes of Expert Advisors for MetaTrader 5 - 34

icon

Expert Advisors analyze price charts and trade automatically following underlying rules. Here you can find MQL5 source codes solving a variety of problems. You are able to select both simple Expert Advisors based on moving average crossing and complex ones involving complicated signal generation algorithms and protection against trading mistakes.

You can download and launch offered Expert Advisors in MetaTrader 5. It is recommended that you test and optimize trading robots in the Strategy Tester before using them. The library of Expert Advisors is also available directly from MetaTrader 5 platform and MetaEditor development environment.

Submit your code

Pair trading. Hedging. Market-neutral strategies.

Opens a virtual hedge position in MetaTrader 5.

Inspired by Pirat's Expert Advisor submitted to the Automated Trading Championship 2011.

This Expert Advisor illustrates the usage of the IndicatorParameters() function to get the information about the number of input parameters, their type and values.

Introducing the example of visualization of optimization results in real time (balance curve dynamics and an Expert Advisor statistical parameters).

The Expert Advisor is based on EMA_RSI_VA indicator.

The Expert Advisor shows the use of the free LibCustomChart library for the automatic connection of the Expert Advisors and indicators to iCustomChart custom charts created on the basis of custom history files.

This Expert Advisor is example of use of the Memory Mapping DLL for working with File Mapping functions. In this example the Expert Advisor create a virtual (memory-mapped) file and start to update the quotes on symbol. Using this way, Expert Advisors can exchange data (for example, quotes) using common memory-mapped file.

Multicurrency "grider" with risk control (version for Automated Trading Championship 2011 and updated version).

Multi-currency Expert Advisor that analyze resonance events at related financial assets.

Automated Trading Championship 2011 version.

Multi-currency trend following expert system using the Triple Exponential Moving Average technical indicator.

This Expert Advisor is a demo of working with OBJ_CHART objects as conventional charts. You can set custom color settings, attach indicators etc.

The cIntBMP library provides the creation of graphic BMP images. We will consider the example of its use in creation of self-similar fractal sets using the Iterated Function System (IFS).

The Roulette Game.

Trade signals based on "Morning Star/Evening Star" candlestick patterns, confirmed by Relative Strength Index (RSI) indicator is considered. The code of the Expert Advisor based on this strategy can be generated automatically using the MQL5 Wizard.

Trade signals based on "Morning Star/Evening Star" candlestick patterns, confirmed by Market Facilitation Index (MFI) indicator is considered. The code of the Expert Advisor based on this strategy can be generated automatically using the MQL5 Wizard.

Trade signals based on "Morning Star/Evening Star" candlestick patterns, confirmed by Commodity Channel Index (CCI) indicator is considered. The code of the Expert Advisor based on this strategy can be generated automatically using the MQL5 Wizard.

Trade signals based on "Morning Star/Evening Star" candlestick pattern, confirmed by Stochastic indicator is considered. The code of the Expert Advisor based on this strategy can be generated automatically using the MQL5 Wizard.

Trade signals based on "Bullish/Bearish Meeting Lines" candlestick pattern, confirmed by RSI (Relative Strength Index) indicator is considered. The code of the Expert Advisor based on this strategy can be generated automatically using the MQL5 Wizard.

Trade signals based on "Bullish/Bearish Meeting Lines" candlestick pattern, confirmed by Market Facilitation Index (MFI) indicator is considered. The code of the Expert Advisor based on this strategy can be generated automatically using the MQL5 Wizard.

Trade signals based on "Bullish/Bearish Meeting Lines" candlestick pattern, confirmed by Commodity Channel Index (CCI) indicator is considered. The code of the Expert Advisor based on this strategy can be generated automatically using the MQL5 Wizard.

Trade signals based on "Bullish/Bearish Meeting Lines" candlestick pattern, confirmed by Stochastic indicator is considered. The code of the Expert Advisor based on this strategy can be generated automatically using the MQL5 Wizard.

Trade signals based on "Hammer/Hanging Man" candlestick pattern, confirmed by Relative Strength Index (RSI) indicator is considered. The code of the Expert Advisor based on this strategy can be generated automatically using the MQL5 Wizard.

Trade signals based on "Hammer/Hanging Man" candlestick pattern, confirmed by Market Facilitation Index (MFI) indicator is considered. The code of the Expert Advisor based on this strategy can be generated automatically using the MQL5 Wizard.

Trade signals based on "Hammer/Hanging Man" candlestick pattern, confirmed by Commodity Channel Index (CCI) indicator is considered. The code of the Expert Advisor based on this strategy can be generated automatically using the MQL5 Wizard.

Trade signals based on "Hammer/Hanging Man" candlestick pattern, confirmed by Stochastic indicator is considered. The code of the Expert Advisor based on this strategy can be generated automatically using the MQL5 Wizard.

Trade signals based on "Bullish Harami/Bearish Harami" candlestick pattern, confirmed by Relative Strength Index (RSI) indicator is considered. The code of the Expert Advisor based on this strategy can be generated automatically using the MQL5 Wizard.

Trade signals based on "Bullish Harami/Bearish Harami" candlestick pattern, confirmed by Market Facilitation Index (MFI) indicator is considered. The code of the Expert Advisor based on this strategy can be generated automatically using the MQL5 Wizard.

Trade signals based on "Bullish Harami/Bearish Harami" candlestick pattern, confirmed by Commodity Channel Index (CCI) indicator is considered. The code of the Expert Advisor based on this strategy can be generated automatically using the MQL5 Wizard.

Trade signals based on "Bullish Harami/Bearish Harami" candlestick pattern, confirmed by Stochastic indicator is considered. The code of the Expert Advisor based on this strategy can be generated automatically using the MQL5 Wizard.

Trade signals based on "Bullish Engulfing/Bearish Engulfing" candlestick pattern, confirmed by Relative Strength Index (RSI) indicator is considered. The code of the Expert Advisor based on this strategy can be generated automatically using the MQL5 Wizard.

Trade signals based on "Bullish Engulfing/Bearish Engulfing" candlestick pattern, confirmed by Market Facilitation Index (MFI) indicator is considered. The code of the Expert Advisor based on this strategy can be generated automatically using the MQL5 Wizard.

Trade signals based on "Bullish Engulfing/Bearish Engulfing" candlestick pattern, confirmed by Commodity Channel Index (CCI) indicator is considered. The code of the Expert Advisor based on this strategy can be generated automatically using the MQL5 Wizard.

Trade signals based on "Bullish Engulfing/Bearish Engulfing" candlestick pattern, confirmed by Stochastic indicator is considered. The code of the Expert Advisor based on this strategy can be generated automatically using the MQL5 Wizard.

Trade signals based on "Dark Cloud Cover/Piercing Line" candlestick pattern, confirmed by Relative Strength Index (RSI) indicator is considered. The code of the Expert Advisor based on this strategy can be generated automatically using the MQL5 Wizard.

Trade signals based on "Dark Cloud Cover/Piercing Line" candlestick pattern, confirmed by Market Facilitation Index (MFI) indicator is considered. The code of the Expert Advisor based on this strategy can be generated automatically using the MQL5 Wizard.

Trade signals based on "Dark Cloud Cover/Piercing Line" candlestick pattern, confirmed by Commodity Channel Index (CCI) indicator is considered. The code of the Expert Advisor based on this strategy can be generated automatically using the MQL5 Wizard.

Trade signals based on "Dark Cloud Cover/Piercing Line" candlestick pattern, confirmed by Stochastic indicator is considered. The code of the Expert Advisor based on this strategy can be generated automatically using the MQL5 Wizard.

Trade signals based on "3 Black Crows/3 White Soldiers" candlestick pattern, confirmed by Relative Strength Index (RSI) indicator is considered. The code of the Expert Advisor based on this strategy can be generated automatically using the MQL5 Wizard.

1...27282930313233343536