Watch how to download trading robots for free
Find us on Telegram!
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

Top MQL4 and MQL5 source codes based on user ratings - 16

Submit your code

Usually most brokers do not provide M1 data over 3 months in MetaTrader 4, but they provide M1 data over 3 years in MT5. So we can use this tool to obtain the M1 data in MetaTrader 5 tester and save the data into .hst file for MetaTrader 4 backtesting.

This indicator is a MetaTrader 5 version of nonlinear regression. Nonlinear regression is very "fast" when responding to sudden market changes so the default calculation period is set to somewhat longer period than it is usual for similar type indicator. Because of that some experimenting with period is advised based on your trading strategy and trading style.

Schaff Trend Convergence Divergence indicator has the benefit of putting the Schaff Trend CD on a scale of zero to 100, making it easier to identify potential overbought and oversold levels in a currency trend and is using RSI for a final calculation.

The "RocketRSI" indicator by John F. Ehlers. Used to indicate strong probabilities of cyclical reversals.

An Expert Advisor for closing all positions, in case of the total profits on those positions exceeded the Take Profit level fixed in inputs, or where it is necessary to close all positions beyond the time interval fixed in the settings.

CCI of average

Export tool for OHLC prices, calculated prices & indicator buffers

The Alligator Indicator is a combination of Balance Lines (Moving Averages).

The indicator prints the time to close of the current timeframe, if it less than H1, it also prints the time to close of the current hourly bar.

A simple XML-parser, based on the msxml library.

The indicator plots Pivot levels for all available history. There are 5 variants of Pivot levels is supported: Classic, Fibonacci, Demark, Camarilla, Woodies. There are 3 calculation periods: daily, weekly, monthly. For the daily pivot levels it's possible to specify the GMT time shift.

This indicator fits a trigonometric model to prices and extrapolates it in the future.

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.

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.

The indicator generates buy and sell signals using colored dots on a chart and displays messages.

The indicator of the ratio between fast Average True Range (ATR) and slow ATR.

CMAOnArray class is used for Moving Average calculation on indicator buffer's data. The example of use of the class is provided.

Heiken_Ashi_Smoothed_HTF_Signal displays trend direction as a sequence of graphical objects, the trend is determined by Heiken_Ashi_Smoothed indicator.

Trading signals module for MQL5 Wizard. The moment, when NonLagDot indicator changes its color, indicates the time for market entry.

This is a simple but very fast ZigZag with no suspended or wrong peaks. The indicator is designed for use in EAs. Peaks retrieval has been time-optimized.

The MultiCurrency indicator allows you to concurrently analyze up to eight currency charts.

The file selection graphical interface class.

The Balance of Power (BOP) indicator was described by Igor Livshin and measures the strength of the bulls vs bears by assessing the ability of each to push price to an extreme level.

The class realizes generalized regression network (General Regression Neural Network - GRNN)

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

The indicator counts Bull and Bear candles in Bar_Period bars and calculates percent.

The indicator shows trend and side (flat) price movements.

This class is designed for creating interactive buttons with various states on a price chart.

This example shows the use of the mechanism of custom data frame transmission from agents during a brute force search aimed at finding MD5 hashes. The speed characteristics of the computing network and the progress are shown in real time. The program also demonstrates the principle of virtualization of nonlinear and non-numeric input parameters into a numeric counter.

Displays the number of decimal places (the number of digits in the fractional part), time and values of graphic object anchor points.

VWAP is an intra-day calculation used primarily by algorithms and institutional traders to assess where a stock is trading relative to its volume weighted average for the day.

The Volume_Weighted_MA indicator that fills the chart space with a colored background and displays the most recent value as a price label with the possibility to round the channel levels up to a required number of digits.

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

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

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

The Exp_Trigger_Line Expert Advisor based on signals of the Trigger_Line indicator.

Gann swingchart and hybrid ZigZag implementation.

RSI that is intended to be used as a filter.

The second version of indicator with added features.

The Expert Advisor works comparing iCCI and iMACD indicators.

1...91011121314151617181920212223...183