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

Submit your code

Time to candle Close. Dynamic text colours. Optimised for back-testing.

This Expert Advisor (EA) implements a triangular arbitrage strategy between three currency pairs: EURUSD, USDJPY and EURJPY

The DailyHighLow indicator is a versatile tool designed for MetaTrader 5 (MQL5) to display high and low price levels on a chart based on a specified timeframe. This indicator is particularly useful for traders who rely on key price levels for decision-making, offering flexibility through customizable timeframes and price calculation methods.

A professional script that automatically sets Stop Loss and Take Profit for all open positions based on a customizable Risk:Reward ratio. Perfect for traders who want to maintain consistent risk management across their trades.

Adaptive CCI - Commodity Channel Index with dynamically adjusting upper and lower limits based on market volatility. Eliminates fixed thresholds (like 100/-100) by using EMA-smoothed peaks and troughs, providing more reliable overbought/oversold signals tailored to each asset's current volatility. Perfect for identifying high-probability reversal points with adaptive confirmation levels.

Zigzag which changes wave direction based on price percentage change on the asset

A lightweight tool for manual scalping in MT5 using keyboard shortcuts

The script removes all autotrading icons from the current chart

simple atr supertrend with rsi filter

This indicator builds a dynamic price channel using Gaussian smoothing to determine support and resistance lines. It calculates smoothed high and low price values for a given period, finds their extrema and displays three lines: upper resistance (maximum of smoothed high), lower support (minimum of smoothed low) and the middle line between them, forming an adaptive trading channel.

The Clean Market Watch script is a simple utility tool designed to quickly remove all symbols from your MetaTrader 5 Market Watch window with a single click. This is particularly useful when you want to start fresh with a clean workspace or when your Market Watch has become cluttered with too many symbols. Purpose Over time, traders often accumulate numerous symbols in their Market Watch window, making it difficult to focus on the instruments they actively trade. Manually removing symbols one by one can be tedious and time-consuming. This script automates the entire process, clearing all symbols in seconds.

Securing data transfer between client and Server could be a big challenge for you as MQL5 programmer. You may have experience in using built in MQL5 encryption systems like AES.AES can securely encrypt your data but on the other hand is not secure when it comes to sending the AES key through insecure channels. You can only rely on asymmetric encryption systems Like RSA in such cases. you keep the private key at your server side and only share the public key with your clients. Even more you can use hybrid RSA_AES approach to archive more performance

Fox Wave Clean - Professional Order Manager Professional EA for efficient trade management with one-click position control. Clean design, powerful functionality.

It's like a bird's-eye view for BBMA Oma Ally fans. ust drag it onto the chart and you'll get all the BBMA signals running on the chart.

A chart-based risk monitor for prop-firm style rules: draws a live “Dead-Line” price level showing where your Daily Loss Limit or Overall Max Drawdown would be violated, based on equity, open exposure, and optional trailing drawdown.

Automates MQL5 buffer and plot index management. Eliminates manual counting, simplifies Z-order layering, and handles complex plot types (Candles, Color Lines) with a single line of code.

If you have access to the Expert Advisor code, you can save balance and equity charts and calculate additional optimization criteria by adding additional code from this library.

A comprehensive stop-loss and trade management module offering multiple stop-loss methods (Fixed Pips, ATR-based, Swing High/Low, and Percentage) and trailing stop options (Fixed, ATR, Step, and Breakeven). It includes automatic broker stop-level adjustment, risk-reward–based take profit calculation, and visual stop-loss lines on the chart. The code follows a clean, structured architecture with a dedicated `CStopLossManager` class, standardized enums and structures, and fully documented English comments for clarity and maintainability.

Download all OHLC data history available and save it in a file, either for just one symbol or for many in Market Watch

Indicator Description – Candle Close Timer Name: Candle Close Timer Version: 1.0 Author: BENTRADE TRADING Link: https://www.mql5.com/en/users/dahmi_benali

NeuroPro Verbalisation Converter for MQL5

ICE Pro v1.0: Momentum Intelligence System. ICE isn't just a static indicator-based EA (Expert Advisor). It's an Adaptive Trading engine that uses volatility (ATR) and volume profiles as primary filters to determine which price movements are "True Impulses" and which are simply "Market Noise."

Complete SMC toolkit: BOS/CHoCH detection, Order Blocks (internal + swing), Fair Value Gaps, Equal Highs/Lows, Premium/Discount zones, Strong/Weak H/L, trend candles, dashboard, 4-channel alerts. Free.

This Expert Allows You To Run and Play DOOM (The Game) on MetaTrader5! It's A Take On The Infamous "Can It Run Doom?" Challenge.

A professional trade management utility that completely hides your Stop Loss and Take Profit levels from brokers. It features a Spread Protector to prevent virtual stop-outs during news events or daily rollovers.

Hon-APS (Advanced Pattern Scanner) is a sophisticated, open-source Expert Advisor for MT5. Unlike typical retail bots relying on lagging indicators, Hon-APS trades structural breakouts backed by quantitative Order Flow algorithms. It actively scans for classical chart patterns (e.g., Head & Shoulders, Bottoms, Triangles) and validates entries using L2 Order Book absorption and bid/ask imbalances. Complete with a polished on-chart UI, true Kelly Criterion risk management, and a robust macroeconomic news scraper, it's designed for prop-firm viability and high-end capital preservation.

An advanced quantitative filter based on Chaos Theory and fractal geometry, it calculates the intrinsic dimensionality of the price curve to instantly classify market regimes into trending or mean-reverting states.

KSQ Command Centre is a production-ready, two-way bridge between MetaTrader 5 and Google Sheets. It was originally designed to help fund managers and quantitative traders remotely monitor and manage large, funded accounts (e.g., Darwinex Zero, Prop Firms, PAM, MAM) directly from a mobile browser, without needing to log in to a VPS. This Expert Advisor not only exports data—it actively listens for commands typed into your Google Sheet and executes them in MT5 in near real-time.

A long-term momentum and trend oscillator based on dual TRIX and LWMA filtering.

Chart Navigator MT5 Light — a mini-chart for quickly navigating the price chart and instantly jumping to your markers on it

A simple Expert Advisor based on the crossover of two EMAs (fast and slow), with configurable Stop Loss, Take Profit, lot size, and Magic Number.

Smart Trend Score is a clean and lightweight MetaTrader 5 indicator designed to identify high-quality trading opportunities using multiple trend and momentum filters.

The KCI-Directional Matrix (KCI-DX) is an advanced, physics-inspired analytical tool that extracts market kinematics by measuring price path length and volatility energy. Unlike conventional momentum tools, KCI-DX employs a dynamic Z-Score normalization combined with a Sigmoid activation function. This ensures the output is flawlessly bounded between 0 and 100, providing hyper-responsive trend strength identification and directional bias without distortion from historical extremes.

The script retrieves your broker’s actual spread from the ‘spread’ field of the M1 bars and displays the median, the 90th and 99th percentiles in price units, in pips and as a percentage of ATR, and also exports the average and maximum spreads for each hour of the day to a CSV file. This is needed to test strategies against the actual costs on your account, rather than against a ‘typical’ spread estimated from memory.

The SMC Order Block Detector indicator features an Advanced Smart Money Concepts (SMC) Order Block (OB) Engine inspired by the TradingHub 3.0 methodology. It is specifically engineered to automatically detect, track, and manage institutional Order Blocks with high precision on MetaTrader 5. A key highlight of this indicator is its Smart Overlap Management: when new Order Blocks form and overlap with existing active zones, the algorithm intelligently evaluates their Fair Value Gap (FVG) sizes. It automatically filters out and deactivates weaker or redundant zones, ensuring that only the highest-probability institutional levels remain on your chart.

On-chart trade management utility for MetaTrader 5 designed exclusively to adjust existing manual or EA positions. Features one-click controls for Break-Even placement, point offsets, profit locking, trailing stops, Risk-to-Reward (1R–3R) Take Profit targets, and volume-validated partial closures (25%–100%). Includes a draggable chart GUI and filtering by symbol and direction. Does not open new trades.

Library for trading session control. At startup it counts the time of trading sessions for all 7 days of the week (on Sat and Sun there can be cryptocurrency trading), up to 10 sessions per day. Then in OnTick() you can do checks, and if a tick came in outside the trading session, you can exit further processing of it.

The source codes written during the development of the library for creating multi-currency Expert Advisors that combine many instances of various trading strategies.

Modification of the standard indicator Fractal

Engulfing Bar Occurs below Ema moving Average that is rising - Buy Trade -

1234567891011...205