Download MetaTrader 5

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

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.

latest|best

The X-bars Fractals indicator allows setting the number of bars on the left and the right from fractal. It is good as for local, so for global extremums

The CSV file was written to write economic news but there was a problem that the Terminal does not distinguish lines, exactly their number when working with the CSV file. That is why I decided to share my solution of this problem.

The class is the simplified version of the CArrayRing class: it has a predetermined fixed size of 256 elements, it is faster, and allows to organize the mini time series, indicator minibuffers, short sized buffers to store intermediate stream data inside the Expert Advisor or indicator.

The second (edited and added) version of the alternative indicator for trend definition based on the breakthrough bars and distance from extremums. The breakthrough levels and size of the previous trends are added.

The Exp_VininI_Trend_LRMA trading system is based on changes of the trend direction displayed by the VininI_Trend_LRMA indicator.

The indicator of the candlesticks combinations (Japanese candlesticks)

The class is designed for calculation the technical indicator Stochastic Oscillator (Stochastic Oscillator) using the algorithm of the ring buffer.

The class is designed for calculation of the technical indicator Moving Average of Oscillator (Moving Average of Oscillator, OsMA) using the algorithm of the ring buffer.

The Exp_VininI_Trend trading system is based on change of the trend direction displayed by the VininI_Trend indicator.

The indicator that fixes three states of the market.

This indicator is the conversion of famous Igorad's indicator namely PriceChannel_Signal_v1 with re-enter feature.

The class is designed for calculation of the technical indicator Moving Average Convergence/Divergence (Moving Average Convergence/Divergence, MACD) using the algorithm of the ring buffer.

Another variation on Moving Averages...

The breakthrough system with the CorrectedAverage Moving Average.

A trend indicator which determines its values based on the signals taken from the LRMA Moving Average and a group of its signal lines whose periods change in the arithmetic progression.

A trend indicator which determines its values based on the signals with the group of Moving Averages whose periods change in the arithmetic progression.

The script calculates Pivot Point on all the symbols from the market watch and displays the results in html-file.

A trend indicator which determines its values based on the signals taken from the Williams' Percent Range indicator and group of its signal lines whose periods change in the arithmetic progression.

The Dynamic Support/Resistance indicator for MetaTrader

The indicator displays three variants of time in the chart: local, server and GMT!

The class is designed for calculation of a technical indicator Average Directional Movement Index Wilder (Average Directional Movement Index Wilder, ADX Wilder) using the algorithm of the ring buffer.

The class is designed for calculation of a technical indicator Average Directional Movement Index (Average Directional Movement Index, ADX) using the algorithm of the ring buffer.

The class is designed for calculation of the Average True Range indicator (Average True Range, ATR) using the algorithm of the ring buffer.

The Exp_ColorTrend_CF trading system is based on change of the trend direction displayed by the ColorTrend_CF indicator

Initial library of combinatorics functions.

The class is designed for calculation of Moving Averages (Moving Average) using the algorithm of the ring buffer.

The class allows to organize the mini time series, indicator minibuffers, short sized buffers to store intermediate stream data inside the Expert Advisor or indicator.

The Exp_ColorLeManTrend trading system is based on changes of the trend direction displayed by the ColorLeManTrend indicator

Disparity Index (difference index) displays the difference between the close price and chosen Moving Averages in percentage. It is recommended to use in combination with the other candlestick models

A trend indicator drawn on the basis of the advanced Keltner channel.

The renko (renko) chart in a separate subwindow. No matter on what chart timeframe the indicator is attached, the renko is drawn on close price of М1 timeframe.

The Expert Advisor drawn on the basis of the change of direction of the ColorMomentum_AMA indicator.

The trend indicator drawn on the basis of the Bollinger Bands.

Delta ZigZag defines the reversal on a minimal height of the swing and also identifies trend on breakthrough of local minimum/maximum levels and colors zigzag sections in current trend color

The indicator displays trend force and direction

The trend indicator that displays possible rollback option

The indicator displays the spread levels and the minimum acceptable level of stop loss/take profit in points

The indicator displays the breakthrough line

Trading system based on the signals taken from the ColorStochNR oscillator

The drawing of this Moving Average is based on Demark's method "Daily Range Projections".

1...697071727374757677787980818283...104