MQL5 Source Code Library for MetaTrader 5 - 15
This is the largest free source code library for MetaTrader 5 platform programs. Here you can find ready-made Expert Advisors, technical indicators, scripts and libraries. Use the code library when learning MQL5 language and develop your own automated trading applications based on the provided codes.
You can freely download and test published codes, as well as launch them in MetaTrader 5. The library is also available directly from MetaTrader 5 platform and MetaEditor development environment.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
Utility script that exports your MetaTrader 5 trading history to a CSV file. It automatically calculates Maximum Favorable Excursion (MFE), Maximum Adverse Excursion (MAE), and Forward Returns (Time-Based Excursions) in whole points for deep quantitative analysis in Excel. It will allow you to understand whether you close your trades too early and can help optimize overall trading execution.
A chart-cleanup + quick-trading layer for MT5
Keltner style reversal EA for Gold (XAUUSD) with dual EMA filter and optional recovery basket. Basket take profit and hard stop in money, session and spread filters, trailing stop. Updated October 2026 (v1.2). Open source code.
Self-Aware Trend System (SATS) is an advanced MQL5 indicator that combines an adaptive SuperTrend engine with a Trend Quality Index (TQI) dashboard, offering dynamic signal detection, risk management levels, and self-learning calibration for smarter, more reliable trade entries.
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.
The script shows the usage of L1 Trend Filter methods in MQL5 for float and double vectors on random walk simulated data.
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 machine-learning inspired approach towards trending regimes. Providing accurate signals and backtest confidence built-in
Adaptive moving average crossover indicator for MT5. A range aware fast line and an efficiency aware slow line, color coded bias and arrows on each cross. Gold, forex and indices. Updated October 2026 (v1.2). Open source code.
Candle countdown HUD with trading sessions (UTC), live spread and anomaly detection, daily range vs ADR, and market-closed state with reason (holiday / weekend / session). Holidays calendar included for seven major markets.
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.
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.
A quantitative multi-asset oscillator designed for Statistical Arbitrage (Pairs Trading), it calculates the logarithmic spread between two correlated assets and measures its Z-Score to identify risk-neutral mean-reverting opportunities.
RSI momentum candle indicator for MT5. Colors every candle by momentum state in four bias levels plus neutral, no separate oscillator window. Three modes. Gold, forex and indices. Updated October 2026 (v1.3). Open source code.
Using arrow to open a position and the middle line to exit from the position that is currently open.
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.
QuantumAlgo Trade Panel is a professional-grade trading utility for MetaTrader 5, designed to bridge the gap between complex institutional strategies and seamless execution. Whether you are a Scalper, Swing Trader, or follow Smart Money Concepts, this panel automates your risk management and technical analysis, allowing you to focus purely on the setup.
Institutional-grade forex session detection and analysis library for MetaTrader 5.
Bidirectional grid EA for Gold (XAUUSD). Candle direction filter, lot doubling up to a cap, basket exit by average take profit or partial close. Daily target and drawdown pause. Updated October 2026 (v1.1). Open source code.
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.
One click trade panel for MT5 and MT4. Buy and sell with lot by fixed size or balance percent, SL and TP by price or distance, breakeven, close all, partial close, pending orders set on the chart. Updated October 2026 (v1.1). Open source code.
This mini custom-built MetaTrader 5 dashboard is a robust, comprehensive risk management and performance based monitoring tool and utility created to give both Prop firm and personal funded traders full visibility and control over their trading activity in real time.
RSI Grid Overlap Pro is a professional MT5 Expert Advisor combining RSI-based market entries with an adaptive grid recovery system. It features intelligent overlap order management to reduce drawdown, plus virtual trailing stop, breakeven, and three lot sizing modes — fixed, balance-proportional, and risk-based — making it suitable for both conservative and aggressive trading styles.
Economic calendar trading guard library for MetaTrader 5 with live MQL5 Calendar API integration.
A Market Structure indicator featuring Fibonacci Intelligence to provide accurate Buy/Sell signals.
Symbol Summary is an MT5 service that opens a separate viewer window and displays a detailed report for a trading symbol. It supports Russian and English, window resizing, scrolling, and automatic report updates when the watched chart changes symbol or timeframe, without restarting the service.
BEC is an advanced trade management Expert Advisor designed to automate breakeven, trailing stop, and position control — all from a powerful on-chart dashboard.
ASQ PropGuard is a real-time prop firm rule monitor for MetaTrader 5. It tracks daily loss limits, maximum drawdown, profit targets, and trading day requirements — all displayed on a dark-themed chart overlay with color-coded progress bars and a live pass/fail verdict.
Hon-Matrix is an advanced algorithmic trading system that combines Price Action, Volatility Analysis, and Real-Time News Filtering. Unlike standard "static" EAs, Hon-Matrix utilises a dynamic decision-making engine that identifies the current market phase (Trending vs. Ranging) and switches its entry logic accordingly. It features a professional-grade on-chart dashboard allowing for live parameter adjustments without restarting the EA, making it a powerful tool for both automated prop-firm passing and personal capital growth.
An unsupervised machine learning indicator that applies the K-Means clustering algorithm to historical price action, mathematically detecting and plotting the true institutional liquidity pools without human bias.
A multi timeframe indicator which features RSI divergence. + Buy/Sell signals Inspired from trading view.
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.
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.
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.
ASQ CommandDesk is a professional order management panel for manual traders on MetaTrader 5. You make the trading decisions — CommandDesk handles execution, risk control, and exit management automatically.
On-chart candle analysis indicator with structure tags, sentiment, and trend arrows for MetaTrader 5.
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.
Imbalance Finder is an MT5 indicator that automatically detects bullish and bearish Fair Value Gaps (FVGs) and tracks whether each imbalance remains active, gets tapped, or becomes fully filled. It draws clear chart zones in real time, helps traders identify potential support and resistance areas, and also provides data buffers for Expert Advisors and automated strategies.