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 Code Library for MetaTrader 5 - 80

icon

This is the largest free source code library for MetaTrader 5 platform programs. Here you can find ready-made Expert Advisors, technical indicators, scripts and libraries. Use the code library when learning MQL5 language and develop your own automated trading applications based on the provided codes.

You can freely download and test published codes, as well as launch them in MetaTrader 5. The library is also available directly from MetaTrader 5 platform and MetaEditor development environment.

Submit your code

Two identical trading systems based on the change in the ColorJFatl_Digit moving direction for long and short trades, which can be configured in different ways in one Expert Advisor.

A trading system based on the NRTR_ATR_STOP indicator signals with the possibility to set a strict trading time interval.

Works with pending Buy Stop and Sell Stop orders. The EA uses the iMA (Moving Average, MA) indicator with a VERY large period equal to 590.

The indicator marks the current day's time period specified in the indicator settings using colored rectangles.

The indicator marks the time period specified in the indicator settings using colored rectangles.

An alert (an audio alert, email and push notification) is generated when the iMA (Moving Average, MA) indicator crosses the bar with index N.

A strategy based on iMA (Moving Average, MA) and iMACD (Moving Average Convergence/Divergence, MACD).

The indicator shows the number of bullish and bearish bars in the given interval.

Counting the number of series of bullish and bearish bars. Displaying the result as a chart. Saving the screenshot of the resulting chart. The script uses the CGraphic class.

The indicator shows a text block with the values ​​of the user defined DeMarker oscillator period for each timeframe.

The indicator shows a text block with the values ​​of the user defined WRP oscillator period for each timeframe.

Counting the number of series of bullish and bearish bars. Displaying the result as a chart. Saving the screenshot of the resulting chart. The script uses the CGraphic class.

Color candlesticks display areas, in which the MACD indicator crosses the zero line.

Displays areas, in which the MACD indicator crosses the zero line.

An example of a template for developing automated trading systems.

The expert advisor moves stop loss of position at user-defined breakeven.

A library for common rounding methods used in MQL development, primitive wrapper class for type (double), and vector for CDouble objects. MQL5 and MQL4 compatible!

A complete Renko chart indicator with wicks. Configure using Tick Size, Pip Size, Points or R. Now with Asymetric Reversals!

Simple Expert Advisor based on the Larry Conners RSI 2 strategy.

Script for checking the LeadLagRelationship indicator (https://www.mql5.com/en/market/product/26229)

PS Magicas - Three moving averages that give target and possible entries.

An implementation of the dictionary (associative array) data structure in MQL5, based on CArrayObj and CList.

The indicator of support and resistance lines calculated based on the iFractals (Fractals) indicator values.

The trading system is based on iMACD (Moving Average Convergence/Divergence, MACD) and iStochastic (Stochastic Oscillator)

The Expert Advisor checks the direction in which the price has been moving for the last 10 seconds, and opens a position in accordance with the movement. The EA sets Stop Loss and Take Profit.

Works with pending stop orders (Buy Stop and Sell Stop). Monitors spread %.

The EA lock positions.

A trading system based on the Alligator indicator. If possible, the EA moves positions to breakeven and then enables trailing stop.

The Expert Advisor uses the following indicators: Moving Average Convergence/Divergence, MACD; Moving Average, MA; Average Directional Movement Index, ADX. It closes half of the profitable position.

The Expert Advisor trades in a channel. When a flat channel is found or when the market slows down, the EA places a pending order expecting the channel breakout.

Displays average values ​​of the bulls and bears power.

The script has three independent functions for determining the current FORTS futures.

A trading system based on the Vortex indicator signals.

A library for creating icons in the Windows taskbar and for sending text alerts. The use of this library will help you make your MQL programs more informative.

The Momentum indicator implemented in the form of a color histogram.

An indicator from "Technical Analysis of Stocks & Commodities" (January, 2010).

A multi-currency Expert Advisor based on the iStochastic (Stochastic Oscillator) indicator signals.

A library for working with chart subwindows.

The Expert Advisor trades based on the i-Regr indicator signals.

The МТ45 Expert Advisor is based on the Martingale strategy. It is designed for trading in the МetaТrader 4 and МetaТrader 5 terminals.

1...737475767778798081828384858687...185