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

Submit your code

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.

Indicator MultiBrainTrend2_V2_x10 shows information on the current trends, using the colors of indicator BrainTrend2_V2 from ten different timeframes.

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

MT5 version of the indicator https://www.mql5.com/ru/code/25465

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

The Gator Oscillator is based on the Alligator and shows the degree of convergence/divergence of the Balance Lines (Smoothed Moving Average).

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.

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 finds the nearest neighbor by using a weighted correlation coefficient, in which more recent prices have larger weights. The weight decays linearly from newer to older prices within a price pattern.

The API functions to Free Fuzzy Logic Library.

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 DRAW_COLOR_SECTION drawing style is used to plot sections with different colors, the colors are specified in the color buffer.

BrainTrend2 is an indicator of the market trends that assigns colours to candlesticks according to the trend direction.

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

The current time position in relation to the beginning and the end of the bar is shown. In addition the ratio between the time passed since the beginning of the bar and the whole bar duration expressed in percents is given. It is useful for choosing the moment of making a trade decision.

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

The indicator builds a candlestick chart consisting of floating spread current values in online mode.

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

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 is designed for calculation the technical indicator Stochastic Oscillator (Stochastic Oscillator) using the algorithm of the ring buffer.

Calculation of 32 digit string MD5-hash from transmitted byte array

The class to play music using the MIDI device

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

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.

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 Exp_i-SpectrAnalysis_WPR Expert Advisor is based on change of direction of the i-SpectrAnalysis_WPR indicator.

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.

The indicator plots price channel and Fibonacci levels based on the latest parabolic ZigZag peaks.

The second version of indicator with added features.

The Zigzag2_R_Color indicator with the timeframe selection option in the input parameters and display of values as fractal labels.

1...232425262728293031323334353637...198