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

Submit your code

Indicator Heiken_Ashi_Smoothed_VolatilityStep without rounding, multiplied by the averaged volumes

Indicator MACD Overlay

Indicator Stochastic Overlay

Indicator Multi timeframe Gann Hi Lo Activator

Indicator Smoothed ADX

Relative Strength Index that completely removes noise, works on all markets!

The code above is a "Hammer" indicator that detects candlestick hammer formations (bullish and bearish) and inverted hammer formations (bullish and bearish) on a MetaTrader 5 chart. This indicator identifies price reversal patterns by calculating the size and ratio of the candlestick wicks based on adjustable parameters: MaxRatioShortWick, MinRatioLongWick, and MinCandleSize. When a pattern is detected, the indicator displays a colored arrow near the candle’s lowest or highest price according to the pattern’s direction. The code also includes functions to create and delete objects automatically when the indicator is initialized or stopped.

MACD Divergence indicator

This indicator is based on simple MACD but allows you to choose also timeframe of indicator, different from current. You can choose current timeframe of chart (then indicator shows the same values as common MACD) or any higher timeframe.

There is a Price Channel indicator, but I don't like it, because it fills all the space between the upper and lower boundaries. This version of Price Channel looks like in MetaTrader 4.

Trade signals based on "Hammer/Hanging Man" candlestick pattern, confirmed by Commodity Channel Index (CCI) indicator is considered. The code of the Expert Advisor based on this strategy can be generated automatically using the MQL5 Wizard.

The DRAW_COLOR_ARROW drawing style plots the color arrows (symbols from Windings font).

Fast Adaptive Trend Line (FATL) is based on the low frequency digital filter.

The indicator generates buy and sell signals and issues alerts in case of the Stochastic Oscillator indicator overbought or oversold levels crossing.

The Mass Index is intended for detection of trend reversals based on changes in the bandwidth between the highest and the lowest prices.

This ZigZag indicator is based on the Parabolic SAR technical indicator.

Simplified Ichimoku indicator (Ichimoku Kinko Hyo) containing only the cloud.

More informative Average Directional Index (ADX) indicator with the possibility to select the smoothing algorithm out of ten possible variants.

CBullsBearsOnArray class is designed for calculation of Bulls Power and Bears Power values on indicator buffers. The example of use of the class is provided.

This indicator is based on the integral value of the trend from the fans of similar moving averages with an arithmetic progression of the smoothing period.

The indicator displays the price location within a specified range.

The trading system based on the signals taken from the CMO oscillator

Weighted Moving Average with a minimal lag using a damping cosine wave as the line of weight coefficients

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.

Variation on the non-trivial linear combination of stochastic oscillators

An Expert Advisor based on two indicators - Renko Line Break and RSI. It trades stop orders.

Another version of the indicator that calculates support/resistance levels.

Three Relative Vigor Index indicators from three different timeframes displayed on the same chart.

The indicator draws rectangle candlesticks of a higher timeframe based on the values of the BrainTrend2 indicator.

The TRIX indicator uses Tilson averaging.

This indicator is a small modification of classical Fractals Indicator. You can choose the number or left/right bars to have a new top or bottom as well a shift parameter.

A library of GUI Controls.

A semaphore signal indicator that uses divergence between two WPR oscillators based on extreme points of the last five bars.

The HullTrend_HTF_Signal indicator shows the trend direction or the signal based on the HullTrendSign indicator.

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

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

The Beginner_HTF_Signal indicator shows a trend direction or a signal generated by the Beginner indicator.

Cloud indicator, the envelopes of which represent the RSI oscillator values calculated for High and Low prices.

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

The Flat-Trend indicator with the timeframe selection option available in the input parameters.

1...515253545556575859606162636465...189