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

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

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.

Trade signals based on "3 Black Crows/3 White Soldiers" 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 "3 Black Crows/3 White Soldiers" 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 "3 Black Crows/3 White Soldiers" 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.

The example of use of the resources. It creates a button, using the object of OBJ_BITMAP_LABEL type.

The example of button, created using the object of OBJ_BITMAP_LABEL type.

The Expert Advisor allows to trade using the keyboard.

This is the simplified implementation of multicurrency mode in MetaTrader 5. It isn't necessary to consider the details how does it work. It has minimum settings and simple structure. It can be used in Strategy Tester.

The Expert Advisor uses the Moving Average and Stochastic indicators.

This Expert Advisor performs the synchronization of charts.

Trade signals based on reversal candlestick patterns is considered. The code of the Expert Advisor based on this strategy can be generated automatically using the MQL5 Wizard.

Trade signals based on crossover of lines of the Alligator technical 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 crossover of main and signal lines of MACD indicator (CSignalMACD from MQL5 Standard Library) is considered. The code of the Expert Advisor based on this strategy can be generated automatically using the MQL5 Wizard.

Trade signals based on price crossover of two exponentially smoothed moving averages with intraday filter is considered. The code of the Expert Advisor based on this strategy can be generated automatically using the MQL5 Wizard.

Trade signals based on price crossover of two exponentially smoothed moving averages is considered. The code of the Expert Advisor based on this strategy can be generated automatically using the MQL5 Wizard.

Trade signals based on price crossover with moving average indicator confirmed by ADX is considered. The code of the Expert Advisor based on this strategy can be generated automatically using the MQL5 Wizard.

Trade signals based on three moving averages is considered. The code of the Expert Advisor based on this strategy can be generated automatically using the MQL5 Wizard.

Trade signals based on price crossover with moving average indicator (CSignalMA from MQL5 Standard Library) is considered. The code of the Expert Advisor based on this strategy can be generated automatically using the MQL5 Wizard.

The Expert Advisor is profitable only if the "Open prices" only or "1 minute OHLC" modes used in Strategy Tester.

The Panel Designed for "Best Graphic Panel in MQL5" Contest. This graphic panel allows to automate manual trading. It has many functions, including the visual construction of trading strategies.

The MCM Control Panel provides the solution for multicurrency trading in MetaTrader 5.

The eInTradePanel is a panel for manual trading, it has some useful functions. It needs the minimum space on the chart.

The panel simplifies manual trading and trailing of the opened position.

Control panel for the MQL5 Best Graphic Panel Contest.

This Expert Advisor will simplify the manual trading. It supports the One-Click trading.

Graphic Panel Contest submission.

Chart reinitialization with recalculation of all chart indicators.

It has simple code and trading rules. It's doesn't use any martingale MM strategies.

The OnTick event handler is designed to proceed the ticks for a certain symbol. This is the version of Multicurrency tick event handler.

This Expert Advisor uses two Moving Averages and RSI indicator.

This code is a template of an Expert Advisor, written by Valery Mazurenko (notused) for ATC-2010.

It uses the values of ADX indicator for trading.

This simple Expert Advisor uses Simple Moving Average and ADX indicators.

Using Perceptron, Automatic Learning

1...282930313233343536