Watch how to download trading robots for free
Find us on Twitter!
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 - 6

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

Two identical trading systems (for long and short deals) based on the ColorMETRO indicator signals that can be configured in different ways 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.

The strategy is based on two indicators calculated on two timeframes: iAO (Awesome Oscillator, AO) on the D1 TF and iStochastic (Stochastic Oscillator, Stoh) on H1.

The Expert Advisor is based on the RSI Custom Smoothing indicator.

Two identical trading systems (for long and short deals) based on the VortexIndicator indicator signals that can be configured in different ways 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

Trading is based on the analysis of yesterday's OHLC with the current day value.

RSI EA - trading based on overbought/oversold zones determined by the iRSI (Relative Strength Index, RSI) indicator.

Two identical trading systems (for long and short positions) based on the signals of the Slow-Stoch indicator, which can be configured in different ways within one Expert Advisor

Brief Description

An Expert Advisor based on the iMACD indicator (Moving Average Convergence/Divergence, MACD)

The EA implements averaging of positions. The average iStdDev is calculated in a sliding window.

An EA based on indicator iMA (Moving Average, MA). Reverse of signals. Lot size is either fixed or based on risk percentage.

Grid of market positions. Martingale.

An EA based on indicators iRSI (Relative Strength Index, RSI) and RFTL

Short description

An EA based on indicator iBands (Bollinger Bands, BB). It places pending Stop orders.

A multisymbol EA. Its working algorithm is perceptron, i.e., a simple neural network). It uses indicator iAC (Acceleration/Deceleration, Accelerator/Decelerator Oscillator, AC).

Indicators iCCI (Commodity Channel Index, CCI) and two iMAs (Moving Average, MA) are used.

An EA based on indicator iATR (Average True Range, ATR)

The EA uses indicator iAlligator

A swing-based Expert Advisor: The EA sets a pending stop order with an increased lot size and in the opposite direction.

Simultaneous opening of oppositely directed positions

Opening an opposite position when reaching a profit of N pips

Closing positions when reaching a profit level

An Expert Advisor based on iMA (Moving Average, MA) and iMACD (Moving Average Convergence/Divergence, MACD). Averaging positions, in case of a loss.

An Expert Advisor based on iMA (Moving Average, MA) and iMACD (Moving Average Convergence/Divergence, MACD). Averaging positions, in case of a loss. Improvement of the version 1.0

A trading system based on the signals of indicator i-KlPrice_Vol

The Expert Advisor uses indicators iMA (Moving Avrage, MA) and iRSI (Relative Strength Index, RSI)

A trading system based on the signals of indicator i-KlPrice_Vol_Direct

The market maker robot for trading futures and swap cryptocurrency contracts

A trading system based on the signals of indicator FineTuningMACandle

Two identical trading systems (for long and short positions) based on the signals of indicator RJTX_Matches_Smoothed, which can be configured in different ways within one Expert Advisor

LBS

Working with Stop pending orders. The EA uses indicator iATR (Average True Range, ATR)

Random entry. Random number generator entry.

The trading system based on the signals of the TimeZonePivotsOpenSystem indicator

Expert Advisor based on iRSI (RSI) and iMA (Moving Average, MA).

Simultaneous opening of two oppositely directed positions

Working with pending Buy Stop and Sell Stop orders. The Expert Advisor is based on iCCI (Commodity Channel Index, CCI) indicator

The trading system based on the signals of the Hans_Indicator_Cloud_System indicator

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

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

12345678910111213...36