Watch how to download trading robots for free

Find us on Facebook!
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 - 143


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

A modified Camarilla dt Historical indicator

Conversion from MetaTrader 4 version.

The indicator automatically draws Fibonacci lines by yesterday's or today's range

The channel ZigZag

Trading system using the XMUV and MUV_NorDIFF_Cloud indicators.

The indicator draws horizontal lines on the level of last fractals up and down.

The trend reversal indicator

NRTR is Nick Rypock Trailing Reverse indicator.

Support and resistance levels drawn by the day charts

The script for searching the maximum, minimum and average values of candlestick size

The fast trends indicator drawn on the basis of two normalized XMUV Moving Averages.

The fast trends indicator drawn on the basis of two normalized XMUV Moving Averages.

The fast trends indicator.

The simple, smoothed, less lag indicator drawn on the principle of the smoothed shift using the EMA price by increments of the first 3 orders

Use of the Lagrange polynomial interpolation to predict the future price

The redrawing oscillator drawn on the basis of the SSA.mqh singular transformation library of functions

The MACD smoothed histogram drawn on the basis of the RSI technical indicator.

Trading system using the F2a_AO semaphore, signal indicator.

The indicator of patterns. It is based on the smoothed Commodity Channel Index and Bollinger Bands.


The averaged volatility indicator.

The strongly processed standard Moving Average indicator.

A semaphore arrow indicator using three NavelEMA Moving Averages.

The classic EMA with the linear combination of price timeseries.

RSI with the colored signal levels

Trading system to trade on the trend market using the Color3rdGenXMA Moving Average.

The indicator of ranges of the last three candlesticks of timeframe selected by the trader

Trading system using the Exp_QQECloud trend indicator.

This indicator displays the levels of the "morning flat" and shows possible targets

This Expert Advisor works with Neural Network method

The trade sessions indicator

The i-ParamonWorkTime indicator

Trading system using the FigurelliSeries trend indicator

The simplest non-indicator based trading system that defines the moments of entry by presence of single directed candlesticks

The i-MorningRange indicator

Another variation on reversed, pivot points

Calculator-panel to calculate profit/loss. Data is calculated either when moving lines, or changing the parameters in input fields of the entry price, lot, profit or loss in pips or in deposit currency

The indicator demonstrates the example of using the FileReadInteger() function

The script demonstrates the example of using the FileWriteInteger() function

The script demonstrates the example of using the FileTell() function

The script demonstrates the example of using the FileSize() function