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

Submit your code

Find Perfect Timeframe to trade

This Script collects all MQL5 built-in indicators buffers and stores them in a CSV file for analysis purposes

Automatically draws support/resistance trendlines using 2 pivot detection algorithms. Features real-time breakout detection, auto-adjustment after breaks, historical line display, and comprehensive alerts. Note: This code is developed based on the original work by Rone (Copyright 2012), optimized in 2025.

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

An indicator to detect and mark all popular candle patterns

Indicator displays the value of defined stop loss and or take profit in the deposit currency. Note: It calculates an estimated value based on a simple calculation and does not take into account brokerage commissions.

The Pending_tread EA is a versatile and easy-to-use trading robot designed to automate the placement and management of multiple pending orders arranged in a grid pattern above and below the current market price. This EA is well-suited for scalping strategies and can operate on any timeframe or currency pair, making it highly flexible for various trading styles.

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

The two moving averages crossover strategy is one of the most common trading strategies in the financial market. It is based on the use of two moving averages (usually long and short term) and signals an entry into a position based on their crossover.

Standard Bollinger Bands indicator with averaging features added

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

Capture widescreen screenshots by pressing the 's' hotkey on the keyboard

Linear Regression Value indicator with an option that allows it to be applied to another indicator

higher confidence to get into trade

A simple information indicator that shows the remaining time until the bar closes, as well as the time elapsed since the bar opened and the current time.

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

Bollinger Squeeze Advanced MetaTrader indicator — is a complex indicator consisting of two components: A measure of trendedness based on the Bollinger bands and Keltner channel "squeeze". A trend direction and strength histogram based on one of the following eight oscillators: Stochastic, CCI, RSI, MACD, Momentum, Williams % Range, ADX, DeMarker.

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.

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

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.

The indicator implements some of the most interesting approaches to measuring correlations

EA Spread lister shows the current, min and max values for all symbols / instruments.

This powerful tool filters the classic RSI through a moving average, providing a smoother, more reliable signal line for pinpointing entries, exits, and trend direction with unparalleled clarity.

Showing different ways of the Aroon values calculation

Tillson T3 with EMA calculations done without auxiliary indicator buffers.

Function for closing positions and deleting orders

ExMachina Supply & Demand Zones is a professional indicator that automatically detects supply and demand zones on any chart using impulse-based detection with ATR filtering. Version 2.0 introduces multi-candle impulse detection, full range measurement, zone merging, touch tracking, proximity alerts, and an ExMachina dark theme that transforms your chart into a professional trading workspace.

Technical Details Uses MQL5's OrderSend with TRADE_ACTION_DEAL for instant market closure at current Bid/Ask prices. Includes slippage tolerance (10 points), proper volume matching, and magic number preservation. Loops backward through positions to prevent index shifting during execution.

ASQ FlowDesk is a streamlined trading panel for MetaTrader 5 that provides one-click order execution, scaled take-profit exits, adaptive trailing stops, auto-breakeven, and a live analytics dashboard — all from a clean on-chart GUI.

ASQ RiskGuard is a risk management Expert Advisor for MetaTrader 5 that protects your account from excessive drawdowns. It monitors equity in real time, enforces daily loss limits, guards against high spreads, filters trading sessions, and provides a visual risk dashboard — all running silently alongside your other EAs.

One-click CSV export of trade history with P&L, duration & stats

Daily Risk Monitor Lite is a lightweight MetaTrader 5 indicator that displays daily realized P/L, floating P/L, daily total, current drawdown, and color-based risk status directly on the chart. It is a read-only monitoring tool and does not close trades or block trading.

12345678910111213141516...200