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

Submit your code

Marking the extreme highs and lows (OHLC) together with the extreme bid and ask prices

BBMA ZoneZeroLoss Histogram shows trading zones e.g. for "Reentry" setup for risk minimisation

Keltner Channel (MetaTrader indicator) — is a classical technical analysis indicator developed by Chester W. Keltner in 1960. The indicator is somewhat similar to the Bollinger Bands and Envelopes. It uses three plot lines: the middle line is the 10-day simple moving average applied to the typical price ((high + low + close) / 3), the upper and the lower bands are produced by adding and subtracting the moving average of the daily price range (High and Low difference) from the middle line. This way, a volatility-based channel is built. In this version of the indicator you can modify all the parameters of the MA. The indicator is available both for MT4 and MT5 versions of the platform.

Logger with the ability to log individual modules or code sections

Simple Expert Advisor with custom R-squared optimisation function

Dynamic VWAP level which can be averaged over multiple days

The Watermark indicator is lightweight and efficient, designed to display an informative watermark over the main MetaTrader 5 chart. It automatically shows the current symbol, chart time and asset description, allowing traders to customise their interface with style and convenience.

This is a Moving Average indicator based on Heiken-Ashi candles instead of raw market price.

Weekly VWAP (Volume Weighted Average Price) is a powerful MQL5 indicator that calculates and displays the Volume Weighted Average Price for each trading week. It's a crucial tool for identifying weekly fair value and understanding the underlying sentiment over a longer timeframe.

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

This is a tester script that extends the standard MetaTrader 5 optimisation capabilities, allowing you to evaluate strategies according to complex user-defined criteria (with separation into in-sample and out-of-sample periods, advanced metrics and statistical tests).

A tool to align the trading sessions names with broker server time, and local time

Function to convert server time from one broker's time zone to another.

This Screener was created to simplify the process of finding assets trading at discounted prices. Initial usage may take slightly longer due to the data loading process for all selected instruments. The tool can scan all available broker assets or be limited to specific asset classes.

A JSON library designed for massive use of LLMs and lower latency.

This EA implements a range breakout trading strategy. It calculates a price range between start and end times defined by the user, draws a visual rectangle on the chart to mark the high and low of that range, and then monitors price action after the range closes. If the market breaks above the range high, it opens a buy trade; if it breaks below the range low, it opens a sell trade.

A simple trading strategy based on breakouts of prior Highs and Lows.

An institutional-grade dashboard that breaks down your open positions and calculates your true net lot exposure per individual currency, preventing invisible systemic risks and over-leveraging.

A professional quantitative oscillator that replaces traditional retail momentum indicators like the RSI, it calculates the statistical standard deviation of price action to identify mathematically exhausted reversals.

BEC Trade Manager helps you manage active positions on the current symbol using one-click controls for breakeven, trailing logic, partial close, stop-loss removal, profit-side closing, loss-side closing, and fast scalp entries. It also displays key account and symbol information on the chart, including equity, floating profit, daily profit, stop-loss labels, and basket breakeven preview.

A predictive quantitative engine that replaces lagging retail ATR, it utilizes the Nobel-prize-winning GARCH(1,1) econometric model to mathematically forecast future market volatility and variance.

Dynamic Fair Value Gap (FVG) is an MQL5 indicator for MetaTrader 5 that automatically detects market price imbalances. This indicator is perfectly suited for traders utilizing the Smart Money Concepts (SMC) strategy.

Monitoring of memory leaks in the strategy tester

The default CCI in MT5 doesn't have the shift parameter. This script implements the shift.

This is an indicator to calculate 14 types of moving averages based on close price.

The simplest indicator showing on the current symbol the price change in % since the opening of the trading session.

Chande Kroll Stop indicator - stop levels for short and long positions.

Root Mean Square

Linear Regression Slope

Bollinger Bands with controllable outer band smoothing (pre smoothing)

This indicator is designed to draw a Fibonacci retracement, using as a basis the ZigZag indicator.

This script saves a predefined set of economic events from the MetaTrader's built-in economic calendar into CSV file.

Support and Resistance MetaTrader indicator — as the name of this indicator suggests, it displays the support and resistance levels. It shows them directly on the chart, providing an easy help when you want to set stop-loss or take-profit level, or when you want to see the next market target. This indicator uses the standard MetaTrader Fractals indicator (by Bill Williams' method) and has no changeable input parameters. This indicator is available for MetaTrader version 4 and 5.

Modified standard ZigZag indicator with the addition of information about wavelength in pips, levels and different alerts logic

BotCilento is a sophisticated grid-trading Expert Advisor for MetaTrader 5 that combines trend-following signals with adaptive risk management.

A high-precision indicator designed to detect institutional liquidity sweeps (stop hunts). It identifies price rejection beyond recent swing levels, marking potential high-probability reversal zones without lagging indicators.

Precision Sniper is a multi-confluence MT5 indicator inspired by TradingView's top signal tools, grading every buy/sell signal (A+, A, B, C) based on EMA structure, RSI, MACD, ADX, VWAP, and volume alignment, with 8 presets, HTF bias confirmation, auto TP/SL levels, trailing stop, and a built-in backtest dashboard.

Super pass-band filter as described by John Ehlers

This function allows you to retrieve and return the filling policy of a symbol in MetaTrader 5. This is useful for making trading decisions based on the filling policy of a specific financial instrument.

This is an edit of the Mod_ATR_Trailing_Stop by MQL5 user @Scriptor found here https://www.mql5.com/en/code/20423 . MT5 indicator .mql5 and .ex5 files, report any bugs, I'll fix.

123456789101112...200