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

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

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

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

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

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

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

iATR (Average True Range, ATR) and iStdDev (Standard Deviation, StdDev) indicators are configured for crossing of the two iMAs (Moving Average, MA) plus for Buy and Sell separately.

The EA is based on two iMAs (Moving Average, MA) and iMomentum (Momentum) filter crossing.

The EA based on iCCI (Commodity Channel Index, CCI) indicator plus managing position volumes using martingale.

The EA based on single iMA (Moving Average, MA) indicator signals.

The EA based on three iMA (Moving Average, MA) indicators.

At the beginning of a new day, the EA places pending Buy Stop and Sell Stop orders by High and Low of the previous day.

Expert Advisor based on ZigZag indicator. Working with pending Buy Stop and Sell Stop orders.

Working with pending Buy Limit and Sell Limit orders. Grid of pending orders.

A trading system using the Ang_Zad_C trend-following indicator with the possibility to set a strict trading time interval and change the volume of a forthcoming trade depending on the results of the previous trades.

Three independent trading systems using AbsolutelyNoLagLwma_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

Hedging positions. Working on a new bar.

Three independent trading systems using ColorX2MA_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

Three independent trading systems using ColorJFatl_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

The EA uses the following indicators: iADX (Average Directional Movement Index, ADX), two iMAs (Moving Average,MA) - one indicator at CLOSE prices and another one at OPEN prices, iOsMA (Moving Average of Oscillator, OsMA).

The EA is based on iMA (Moving Average, MA) indicator and analyzes the last six bars.

Closing positions and removing pending orders when reaching a specified profit or loss.

A simple Pivot. No stop loss and take profit are used.

The EA performs initial opening in both directions. Then it tries to pull the remaining side into profit.

Three moving average cross with MACD signal verification before opening order. Updated 8/30/2018:

Two independent trading systems using indicators BrainTrend2 and AbsolutelyNoLagLWMA within one EA, with an option of changing the size of the future trade depending on the results of the previous ones for this trading system

Virtual Trailing Stop.

Two independent trading systems using indicators SilverTrend_V2 and ColorJFatl_Digit within one EA, with an option of changing the size of the future trade depending on the results of the previous ones for this trading system.

Two independent trading systems using indicators BykovTrend_V2 and ColorX2MA within one EA, with an option of changing the size of the future trade depending on the results of the previous ones.

Working with two indicators, Fractals and Stochastic, simultaneously, or with only one of them.

An Expert Adviswor based on two indicators: iCCI (Commodity Channel Index, CCI) and iAO (Awesome Oscillator, AO)

An Expert Advisor for closing all positions, in case of the total profits on those positions exceeded the Take Profit level fixed in inputs or the total losses on those positions exceeded the Stop Loss level fixed in inputs, or where it is necessary to close all positions beyond the time interval fixed in the settings.

An Expert Advisor for closing all positions, in case of the total profits on those positions exceeded the Take Profit level fixed in inputs, or where it is necessary to close all positions beyond the time interval fixed in the settings.

An Expert Advisor for closing all positions, in case of the total losses on those positions exceeded the Stop Loss level fixed in inputs, or where it is necessary to close all positions beyond the time interval fixed in the settings.

The EA uses Martingale. Initial entry by indicator iStochastic (Stochastic Oscillator).

The Expert Advisor uses indicator iBands (Bollinger Bands, BB), two iMAs (Moving Average, MA) from different timeframes, and custom indicator ZigZag.

An Expert Advisor based on indicator iADX (Average Directional Movement Index, ADX).

An Expert Advisor based on cluster indicator CCFp (Complex Common Frames percent)

Two independent trading systems using indicators BykovTrend_V2 and ColorX2MA within one EA.

Two independent trading systems using indicators SilverTrend_V2 and ColorJFatl_Digit within one EA.

Two independent trading systems using indicators BrainTrend2 and AbsolutelyNoLagLWMA within one EA.

1...34567891011121314151617...36