Watch how to download trading robots for free
Find us on Facebook!
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

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

Function for modifying open positions and pending 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

A machine-learning inspired approach towards trending regimes. Providing accurate signals and backtest confidence built-in

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.

Automatically detect Inside Bar patterns, draw projection rectangles, and receive real‑time alerts – all in one powerful indicator. Swing And Full Margin trader

The classic version of the Heads or Tails trading strategy with the analysis of the signal block code.

This is an indicator that helps identify Engulfing candle patterns.

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.

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.

Lightweight CVD (Cumulative Volume Delta) for MT5 — M1-based, shows buy/sell pressure as candles with optional resets.

Bidirectional grid EA for Gold (XAUUSD). Ideal for ProCent accounts. Includes Daily Profit Target and Max Drawdown protection.

The EA opens positions randomly (50/50 chance for Buy or Sell) when no position is open.

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

12345678910111213141516...199