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

Submit your code

The indicator draws colored candlesticks of a larger timeframe as color filled rectangles using DRAW_FILLING buffers. Rectangles are color filled in accordance with the colors of the StreamСCandles indicator candlesticks, if there are any.

A trend indicator based on the intersections of Parabolic Sar and a moving average.

It is the MQL5 version of ZeroLag MACD.

A channel based on peaks and troughs of the ZigZag indicator.

A channel based on peaks and troughs of the Zigzag2_R_Color indicator.

A trading system based on the AFStar indicator signals.

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

Closing positions: all, only profitable or only losing positions.

A trading system based on the 'EMAAngle' and 'Laguerre RSI with Laguerre filter' indicators.

A variation of Deviation Stops (DevStops) indicator. Some are wrongly calling this version a Kase DevStops (which it is not - Kase DevStops indicator is calculated in a quite different way), but this version has its good points too and can be used in regular support/resistance mode. Additionally each DevStop value is colored according to the slope (trend) of the line - when all are aligned in the same direction, it can be treated as a confirmed trend change.

The Expert Advisor uses three iMA (Moving Average, MA) indicators and one iMACD (Moving Average Convergence/Divergence, MACD)

The indicator displays on the chart the previous trading day's channel.

An indicator of levels

A set of digital filters that are always drawn in separate window (due to their nature).

Expert Advisor Exp_BlauTVI_Tm based on the signals of trend-following indicator BlauTVI

The indicator highlights caudate candlesticks of the "hammer" or "inverted hammer" type, the body of such candlestick being in the upper or lower half of the candlestick

A trading system based on the tick volume of bars.

A trading system based on the signals of indicator XPeriodCandle.

Lentz Volatility indicator

Heiken ashi smoothed - zone trade

RSI adaptive double smoothed EMA

The VR Sync Chart Lite indicator is written for demonstration purposes and shows how it is possible to synchronize the object

Weighted deviation

Script gets information about input and output tensors of onnx-model, their types and shapes

Calculates the risk in the account currency for a given trading volume of the selected symbol at different time periods.

Commodity Channel Index (CCI) measures the deviation of the commodity price from its average statistical price.

The Heiken Ashi indicator with smoothing.

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.

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 "Bullish/Bearish Meeting Lines" candlestick pattern, confirmed by RSI (Relative Strength Index) 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 "Morning Star/Evening Star" candlestick patterns, confirmed by Relative Strength Index (RSI) indicator is considered. The code of the Expert Advisor based on this strategy can be generated automatically using the MQL5 Wizard.

The DRAW_ZIGZAG drawing style allow to draw sections using the values of two indicator buffers. It looks like DRAW_SECTION, but it allows to draw vertical sections inside one bar.

Standard Commodity Channel Index with the standard average deviation formula and the possibility to select smoothing algorithm and dynamically changing oversold/overbought levels.

Standard colored MACD histogram allowing to select smoothing algorithms from ten possible variants and containing alerts.

CStdDevOnArray class is designed for calculation of Standard Deviation (StdDev) on indicator buffers. The example of use of the class is provided.

The CTemaOnArray class is intended for calculation of TEMA (Triple Exponential Moving Average) on an indicator buffer.

The candlesticks are colored in red, green and blue colors depending on a trend direction (Moving Average and MACD overall values).

Normalized oscillator displayed as a histogram.

Trading signals module for MQL5 Wizard. SilverTrend_Signal indicator's color dot serves as a market entry signal.

This Expert Advisor illustrates the usage of the IndicatorParameters() function to get the information about the number of input parameters, their type and values.

1...101112131415161718192021222324...183