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

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

The example of button, created using the object of OBJ_BITMAP_LABEL type.

A class for creation and output of BMP images.

The Trend Magic indicator.

The Expert Advisor allows to trade using the keyboard.

This is the simplified implementation of multicurrency mode in MetaTrader 5. It isn't necessary to consider the details how does it work. It has minimum settings and simple structure. It can be used in Strategy Tester.

Nonparametric zigzag. The monotonicity condition for the ascending segment of the zigzag: the High of the any subsequent bar should not be lower than any Low of the ascending segment.

Nonparametric ZigZag, based on the "a-la Clyde Lee Patterns".

The Expert Advisor uses the Moving Average and Stochastic indicators.

The library contains the following hash functions: adler32, CRC-32, MaHash8v64. Also it has functions for radix conversion of a number.

This Expert Advisor performs the synchronization of charts.

This script exports indicator's values to CSV file.

This indicator will allow you to perform the recalculation of the indicator's data only when the new bar on the chart has appeared.

Trade signals based on reversal candlestick patterns is considered. The code of the Expert Advisor based on this strategy can be generated automatically using the MQL5 Wizard.

New version of the sChartsSynchroScroll script.

The improved version of the ZigZag indicator.

Trade signals based on crossover of lines of the Alligator technical indicator is considered. The code of the Expert Advisor based on this strategy can be generated automatically using the MQL5 Wizard.

Trade signals based on crossover of main and signal lines of MACD indicator (CSignalMACD from MQL5 Standard Library) is considered. The code of the Expert Advisor based on this strategy can be generated automatically using the MQL5 Wizard.

Trade signals based on price crossover of two exponentially smoothed moving averages with intraday filter is considered. The code of the Expert Advisor based on this strategy can be generated automatically using the MQL5 Wizard.

Trade signals based on price crossover of two exponentially smoothed moving averages is considered. The code of the Expert Advisor based on this strategy can be generated automatically using the MQL5 Wizard.

This script generates a file with its source code (solution of the classical program in MQL5). It may be useful to study programming and algorithms.

Trade signals based on price crossover with moving average indicator confirmed by ADX is considered. The code of the Expert Advisor based on this strategy can be generated automatically using the MQL5 Wizard.

The DMI Expanded Moving Average Indicator.

Trade signals based on three moving averages is considered. The code of the Expert Advisor based on this strategy can be generated automatically using the MQL5 Wizard.

Trade signals based on price crossover with moving average indicator (CSignalMA from MQL5 Standard Library) is considered. The code of the Expert Advisor based on this strategy can be generated automatically using the MQL5 Wizard.

The indicator plots a channel using the linear regression model: y=b+a*x.

The ZigzagColor_Channel plots a channel by connecting the ZigZag peaks and ZigZag bottoms.

The Expert Advisor is profitable only if the "Open prices" only or "1 minute OHLC" modes used in Strategy Tester.

If you want to optimize your Expert Advisor using your own characteristics, you can use "Custom max" mode via OnTester() function. This code provides you many characteristics, which can be used during the optimization of your EA. Also it allows you to save the optimized charateristics in HTML file.

The iUSDx indicator uses the "MCM Control Panel" for multicurrency mode. It calculates the USD index.

The Panel Designed for "Best Graphic Panel in MQL5" Contest. This graphic panel allows to automate manual trading. It has many functions, including the visual construction of trading strategies.

The MCM Control Panel provides the solution for multicurrency trading in MetaTrader 5.

The script allows you to place the deals history on the chart using the graphic objects.

The eInTradePanel is a panel for manual trading, it has some useful functions. It needs the minimum space on the chart.

The panel simplifies manual trading and trailing of the opened position.

Control panel for the MQL5 Best Graphic Panel Contest.

This Expert Advisor will simplify the manual trading. It supports the One-Click trading.

Graphic Panel Contest submission.

The script exports historical quotes data from MetaTrader 5 for the import to MetaTrader 4. This solution will allow you to get the full history for MetaTrader 4.

Chart reinitialization with recalculation of all chart indicators.

This indicator is a combination of moving average and ATR indicators.

1...171172173174175176177178179180181182183