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

Submit your code

Trade Assistant MetaTrader indicator — a multi-timeframe indicator that is based on three standard indicators: Stochastic oscillator, RSI (Relative Strength Index), and CCI (Commodity Channel Index). It displays current trend directions for M1, M5, M15, M30, H1, H4, D1, W1, and MN1 timeframes. When you follow such an indicator you have a clear picture of the trends across all important timeframes. It doesn't matter which timeframe you attach this indicator to. The indicator can be downloaded for MT4 and MT5.

Custom time and price scale.

Draw daily vertical lines plus the day of week labels on the chart.

The T3 Indicator is an advanced moving average that combines six exponential moving averages to provide smoother price action with reduced lag compared to traditional moving averages.

This is a simple indicator to display histogram of custom bars' durations in minutes. Applicable for renko boxes, PnF, equivolume bars, etc.

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

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.

EquiPeak Drawdown Tracker is an indicator designed to monitor and record the maximum drawdown of your trading account in real time. It is not just an alerter of current drawdown; it is especially useful for visually comparing your current drawdown with the maximum historical drawdown you expect or have previously recorded.

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

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.

An indicator that provides a clear visualization of volume pressure on each side of the market

Expert Advisor for MetaTrader 5 that combines Exponential Moving Averages (EMA) and Relative Strength Index (RSI) to generate trading signals. Includes risk management features and trading time filter.

A candlestick chart which connects the ask price and bid price to the high and low of the candles

It's the classic zigzag with a timeframe input to display a HTF zigzag on a LTF chart

It signals a period of low market volatility that is about to end, foreshadowing a significant price move.

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

While manually adjusting the stop-loss of a single trade to match its open price is a relatively simple task, managing numerous positions individually can be cumbersome and time-intensive. The Titik Impas Breakeven script for MT4/MT5 streamlines this process, providing efficiency and convenience for traders dealing with multiple positions.

The EA only trades buy positions and does not use Sl and TP.

Set three crosses and monitor the daily percentage performance starting from a given time (that can also be set).

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

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

Beginner MetaTrader indicator — a very simple custom indicator that displays the local tops and bottoms on the chart with the red and blue dots near them. It analyzes the maximum and minimums on the certain period and then compares them to the range, in which the currency pair was trading, and if the top/bottom is significant enough, it marks it with the dot. This indicator redraws itself and thus should not be used for generating trading signals as the dots' positions may change. Both MT4 and MT5 versions of the indicator are available.

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.

Dots (MetaTrader indicator) is based on the 2006 indicator by TrendLaboratory. It displays the current trend direction by placing the dots on the main chart. The blue dots signal bullish trend and the red dots signal bearish trend. Although the indicator doesn't rely on any standard MetaTrader indicators, it uses a call to iMA() (moving average) to get the price values depending on the input price type used (Close, Open, High, Low, Typical, etc.) The calculation is based on the cosine of the angle of price change. Trader can modify several input parameters. The indicator is available both for MT4 and MT5 versions of the platform.

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

12345678910111213...194