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

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

A trading system based on the UltraMFI 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.

This Expert Advisor doesn't use any indicators. It only applies analysis of Close prices at bar #1 and the specified bar.

A trading system based on the FX Fish 2MA indicator.

An Expert Advisor based on iRSI (Relative Strength Index, RSI).

A trading system based on iMA (Moving Average, MA) with the averaging period of 55 (the averaging period is hardcoded and is not available in input parameters).

An Expert Advisor based on the iMA (Moving Average, MA) indicator.

One of the variations of the "Avalanche" strategy. Martingale is used.

A trading system based on the ColorXPWMA_Digit 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.

An Expert Advisor based on the iWPR (Williams' Percent Range, %R) indicator with the operation time control.

The Expert Advisor utilizes the High and Low analysis, as well as one iMACD (Moving Average Convergence/Divergence, MACD) and two iMAs (Moving Average, MA).

An Expert Advisor based on the iIchimoku (Ichimoku Kinko Hyo) indicator.

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

Expert advisor uses the difference between bar closes and a close moving average to detect unusual activity, it will then buy arbitrary volatility spikes. This is a prototype that I will be expanding on in the future, at the moment the user can input an arbitrary level to buy at. In future developments I plan on building a neural network in the EA that detects and compares volatility levels.

Expert adviser scans past 500 closing bars and looks for common closing regions as entries.

Draw your horizontal and trendlines and be notified when price crosses them

Increasing a position volume. Entry signal by iDeMarker (DeMarker, DeM) indicator. Regular trailing and trailing by equity.

Trading is based on iAlligator (Alligator) and iRSI (Relative Strength Index, RSI) indicators. Alligator acts as the main indicator, while RSI is used as a trend filter.

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

The EA waits for a gap on a specified timeframe.

Trading by RSI and Moving Average. Moving Average is used as a trend filter on H1.

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

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

Working with pending Buy Stop and Sell Stop orders.

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.

1...34567891011121314151617...36