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

Submit your code

It is the MQL5 version of ZeroLag MACD.

The Exp_TotalPowerIndicatorX Expert Advisor is based on the signals generated by the TotalPowerIndicatorX oscillator. It also provides the possibility to set a strict trading time interval

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

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.

Two independent trading systems using indicators BykovTrend_V2 and ColorX2MA within one EA.

Buff Dormeier's moving average weighted by volume.

Lentz Volatility indicator

Bollinger bands squeeze

Heiken ashi smoothed - zone trade

Indicator Colored Middle Point of Candles

RSI adaptive double smoothed EMA

Weighted deviation

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

To assist traders who wish to open multiple sell orders quickly, a script file has been developed that allows them to execute a large number of trades with just one command. The default take profit and stop loss values are set in 5-digit broker format, but for traders using a 4-digit broker, the default must be TP=40 and SL=20. Num_of_Sell is the number of trades to execute. This script file can be extremely useful for traders who want to take advantage of market conditions quickly and efficiently. By simplifying the process of opening multiple sell orders, it can save traders valuable time and allow them to focus on other aspects of their trading

Custom Hammer and Inverted Hammer

The 'wd.Multi_ClockPrice lite!' is the lite version of 'wd.Multi_ClockPrice', providing a visual representation of server time and bid prices on the chart. It synchronizes with PC clock every seconds, allowing seamless updates even when MT5 is offline. Real-time bid prices are displayed, efficiently meeting the need for price information. Place informational labels in the specified sub-window, adjusting positions as needed.

This script helps traders understand the distribution and range of candles in a specific period, which can be useful for making trading decisions such as determining which historical values to use for Take Profit or Stop Loss.

The CDebugLogger class is a flexible and comprehensive logging utility designed for use in MQL4/5 environments. It allows developers to log messages at various levels of importance (INFO, WARNING, ERROR, DEBUG) with options to include timestamps, function signatures, file names, and line numbers in the log entries. The class supports logging to both the console and files, with the ability to save logs in a common folder and in CSV format. Additionally, it offers functionality to silence logs based on specific keywords, ensuring that sensitive information is not logged. This class is ideal for developers looking to implement robust logging mechanisms in their MQL4/5 applications, with customizable features that cater to a wide range of debugging and monitoring needs.

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

Indicator for Woodie’s CCI trading strategy.

This indicator draws pivot points, resistances and supports.

The indicator shows recalculated ("broken") highs/lows of the standard ZigZag indicator.

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.

Moving average with the linear regression algorithm.

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.

1...212223242526272829303132333435...194