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

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

A trend indicator that uses the MACD values multiplied by the averaged price of the financial asset, made as a colored histogram.

The indicator shows the strength of bulls and bears in a simple manner in a single window.

Short-term and cumulative indices of price fluctuations.

The Color Day indicator colors the bullish and bearish days.

Smoothed fast digital filter JSatl with color indication of movement direction, that displays the most recent value as a price label with the possibility to round the channel levels up to a required number of digits.

Trading system based on the signals of the JSatl_Digit_System indicator.

The indicator implements a breakout system using a channel based on the High and Low price series processed by the algorithm of JSatl_Digit.

Constructor for creating histograms of statistical distributions of indicators, timeseries and their derivatives.

The Exp_AFL_WinnerV2 Expert Advisor that uses the AFL_WinnerV2 indicator.

The AFL_WinnerV2 indicator with the timeframe selection option available in input parameters.

The JSatl indicator with the timeframe selection option available in the input parameters.

Night scalper, trades until 0 am terminal time within a narrow range.

The Expert Advisor averages losing positions based on a particular algorithm.

The XvaMA indicator with the timeframe selection option available in the input parameters.

The Exp_ColorXvaMA_Digit Expert Advisor is based on the ColorXvaMA_Digit indicator color change.

The vaMA indicator with the ability to replace averaging. It displays the most recent value as a price label with the possibility to round the channel levels up to a required number of digits. Additionally, it indicates the trend strength by colored dots based on the standard deviation algorithm.

Synchronization of the bars displayed on all open charts of the terminal.

The statistical distribution of Bid and Ask prices on the chart as a histogram.

Indicator that draws Fibonacci levels based on the last bar.

The Fibo ZigaZag indicator allows to calculate the probable support and resistance levels using the Fibonacci ratios.

The vaMA indicator with the ability to replace averaging. It displays the most recent value as a price label with the possibility to round the channel levels up to a required number of digits. Additionally, it indicates the trend strength by colored dots based on the standard deviation algorithm.

The i4_DRF_v3 indicator with the timeframe selection option available in the input parameters.

The i4_DRF_v2 indicator with the timeframe selection option available in the input parameters.

The vaMA indicator with the ability to replace averaging. It displays the most recent value as a price label with the possibility to round the channel levels up to a required number of digits.

Version of the iBarShift function for the MetaTrader 5, takes a parameter of type datetime — opening time of the bar, the index of which must be found.

The Exp_StochasticDiff Expert Advisor is based on change of direction of the StochasticDiff indicator.

Semaphore signal indicator based on the code of the StochasticDiff indicator.

Semaphore signal indicator based on the code of the RVIDiff indicator.

The Expert Advisor plots a Fibonacci based on the standard ZigZag indicator and traded rectracements from all levels. The levels are fixed and cannot be customized by the user.

The indicator displays the total number of deals by symbol in real time.

A simple trend indicator with calculation of rise and fall in Close prices.

The ZZ Fibo Trader is a simple illustration of the use of the Simple ZZ Fibo, which plots Fibonacci lines on long impulse waves of the ZigZag. In addition, the algorithm illustrates operation of the parabolic system for moving the stop loss.

Simple code that illustrates trading based on the OnTimer event. When the timer triggers, the robot alternately performs buy and sell deals with fixed stop loss and take profit values.

Class for exchanging data between programs. It allows to pass structures of arbitrary size via the global variables of the terminal from one program to another.

The script displays the brief statistics for trading on the instrument over the specified period - the number of deals, profit, profit factor.

The script switches all opened charts at a certain interval. It is also possible to display only the charts of certain symbols.

The Standard Deviation indicator implemented in the form of a color histogram.

Moving average wing averaging of the linear combination of the input price timeseries.

Symbol for downloading the history data for the current symbol with indication of progress.

Script draws the Axel Rudolph levels

1...161718192021222324252627282930...109