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

Submit your code

Good afternoon everyone) First time posting my code!!!

Custom MACD for MetaTrader 5 enhances the classic MACD with real-time signal alerts sent to your phone. Detect trends and reversals with customizable parameters, intuitive visuals, and automated buy/sell notifications.

A SuperTrend indicator that plots trend direction using ATR volatility to create dynamic support/resistance levels for MetaTrader 5.

Let follow previous EA by this link https://www.mql5.com/en/code/46630

Checks if either upper or lower Wick range of a candlestick is greater than Body range of a candlestick and plot a wingding

A sophisticated tool that accurately measures market noise

The indicator shows the angle or average speed of price change.

This code does not trace the iatr() because the iatr() or this code is a more modern version. This code uses original smoothing, a kind of SMA and not wilder smoothing. The analysis of the two smoothings can suggest opportunities elsewhere

A price increase indicator calculates margin and price changes in per cent.

This script is a reference solution for mapping symbol names configured by users in MetaTrader 5 EAs or scripts to the actual names provided by the broker. It uses the Levenshtein distance algorithm to automatically identify the most similar symbol in Market Watch. It is ideal for developers facing compatibility issues with prefixes or suffixes in symbol names. This is a customizable starting point to adapt to any specific needs.

ATR %, ATR percentage, ATR percentage, ATR percentage, ATR percentage

Whether you’re running multiple trading robots simultaneously or just one sophisticated strategy, keeping track of each Expert Advisor’s performance can be surprisingly time-consuming. MetaTrader 5 (MT5) conveniently displays orders and positions in its “Toolbox,” but when numerous robots share the same account, it becomes harder to know which EA is generating your profits—or losses. A single account might have dozens or hundreds of trades, each opened by different EAs, making it difficult to separate the results of one robot from another.

Indicator for calculating the average price of open positions, you can use the magic number if you want to separate the positions of just one robot, but the zero number is for manual operations.

This is an indicator that evaluates FVGs in the inputted "window_size" to detect momentum or trend strength.

Two Symbol Spread Indicator

This indicator takes RSI divergences and plots them in buffers to automate EAs

Candle Signature with Example | For Research and Development

The XMA_Ishimoku indicator with additional trend strength indication using colored dots based on the standard deviation algorithm. The original code in the attached link had plotting problems.

The Candle Filter indicator is a customisable tool designed to filter and highlight candles on the chart based on specific criteria. It allows the trader to visualise only the candles of interest, such as bullish candles, bearish candles, Doji candles or all candles simultaneously. In addition, the indicator offers full control over the colours of the candles and the chart background, providing a clear and adaptable visual experience.

This is a custom indicator for MetaTrader 5 whose sole purpose is to display a BMP image on the chart, centred on the screen

Trading XAUUSD (Gold) is often influenced by major economic news events like USD, GBP, or EUR releases. To mitigate risks during these volatile periods, using a News Filter in your Expert Advisor (EA) is essential. In this article, I’ll share how to create a simple News Filter on MT5 and apply it to XAUUSD trading.

All indicators required by BBMA Strategy in a single indicator.

Unpack GZIP archives from *.gz files or responses from sites compressed with this format.

The Standard fractals are 2 candles to the right and 2 candles to the left. With this Custom Fractals you can choose as many candles as you like, both to the left and to the right.

Historical equity of one-time and one-time open virtual positions to analyse the efficiency of spread/equity trading

Candlestick Fitness concept is used in coding HFT Algos based on population optimization algorithms.

Symbol Swap Panel: Effortlessly switch the active symbol on your chart while simultaneously adding the new symbol to Market Watch. This tool ensures seamless integration and access to real-time market data, optimizing your trading workflow.

A class for reading and writing individual bits or bit sequences to and from a buffer.

Set TakeProfit by just dragging and dropping script on the desired price level.

It will automatically plot a colored horizontal line on the previous open/highs/lows/close of the selected period, and it will make the lines consistent on this price when switching timeframes.

Anlayse swing highs and lows

Syncs all chart symbols to symbol of the chart the EA is attached to

The book "Neural networks in algorithmic trading with MQL5" is a comprehensive guide, covering both the theoretical foundations of artificial intelligence and neural networks and practical aspects of their application in financial trading using the MQL5 programming language.

Searches for Wick or Body based High low in visible bars of chart

Chaykin Money Flow (CMF)" indicator

Basic library to create Volume Profiles on chart.

Linear Regression Line

A customized bid and ask line which is labelled and clear to help visualize the bid and ask prices

This CalculateHistoryProfit script version 1.0 is designed to calculate profit for a specified period using a chart panel.

BollingerBandsEA trades according to Bollinger Bands.

123456789101112...191