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

MQL5 Source Code Library for MetaTrader 5

icon

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.

Submit your code

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.

A dynamic Smart Money utility that identifies institutional Order Blocks backed by volume anomalies and automatically tracks their mitigation state to keep your charts clean and focused on fresh liquidity.

A high-frequency trading utility designed to measure real-time tick velocity and detect toxic order flow spikes before they reflect entirely on standard price candles.

Multi-timeframe confluence indicator designed to snipe accurate entries. Inspired from TradingView

A daily bias Expert Advisor that trades market dominance, analyzing previous day bullish vs bearish control with MA confirmation, and executing a single, minimum-volume trade with ATR-based risk management.

A free, open-source breakout scalping Expert Advisor for MetaTrader 5 by AlgoSphere Quant. It implements a strict seven-condition entry system where every condition must align simultaneously before any trade is taken.

An institutional time and price filter that highlights strict macroeconomic trading windows and automatically projects Fair Value Gaps exclusively when institutional volume is present.

A professional object-oriented MQL5 library designed for quantitative developers. It provides asynchronous order execution and dynamic slippage control to prevent terminal freezing during high-frequency algorithmic trading.

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.

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.

ATR-based trend indicator with 3 ATR modes (Wilder/SMA/EMA), dynamic color line, signal arrows, trend duration, distance in pips, trend strength rating, signal counter, expanded dashboard, 4-channel alerts. Free.

A professional intermarket analysis tool. It overlays the USD Index (DXY) on any chart to identify SMT Divergences and institutional correlation shifts in real-time.

A lightweight, essential utility for ICT and SMC traders. It automatically plots the True Daily, Weekly, and Monthly Open prices, serving as the foundation for the Power of 3 (Accumulation, Manipulation, Distribution) concept.

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.

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.

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.

ZigZag SNR Detection identifies support and resistance levels using ZigZag pivot points.

This EA serves as a template for traders interested in automating strategies in MT5. It implements a Moving Average crossover system and can be used as-is or customized by adjusting its settings. The free source code is designed to be easily modified for adding new indicators, logic, and trading features.

This Expert Advisor (EA) is designed to detect swing highs and lows on the H4 timeframe, then wait for sweeps (liquidity grabs) on the M15 timeframe to trigger buy/sell trades with defined risk management.

Multi-timeframe CRT Indicator(Explorer) that detects higher timeframe setups and projects CRH/CRL levels onto lower timeframe charts using Fibonacci objects for clear, real-time context.

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.

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 clean, lightweight, and non-repainting indicator that automatically detects and draws Smart Money Concepts (SMC) Fair Value Gaps (FVG) directly on your chart across any timeframe.

The standard MACD on MT5 platform seem to be not enough so I code this version by copying from the pinescript.

Regime-adaptive grid EA with three operating modes (BGT/TGT/MGT), ATR-dynamic spacing, CUSUM change-point detection, equity-based cycle management, and a full CSV diagnostics pipeline. Based on the Bi-Directional Grid Constrained (BGC) stochastic process research by Taranto & Khan (2020–2022).

Heikin Ashi overlay (color candles or line) with 5 smoothing methods, step filter, MTF, signal arrows, strength meter, dashboard, and 4-channel alerts (popup/sound/push/email). Free.

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.

NeuroPro Verbalisation Converter for MQL5

A strict Multi-Timeframe Price Action Expert Advisor that trades based on precise OHLC conditions across different timeframes simultaneously. It features pending order entries, role reversals, and dynamic risk management without using any lagging indicators.

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

Just two timeframes — H1 and D1 — work synchronously to filter out the noise and capture only strong RSI reversals from overbought and oversold zones. No random entries, only a clear confirmation of the direction from the "big brother."

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.

Highlights Inside Bar candlestick patterns on the chart and provides optional popup and push alerts when a new pattern is detected.

Trade With MA Trends ATR TPSL Line and The Line Of Pivot Point

A lightweight tick-driven dashboard that reveals short-term Bid-Ask pressure directly on the chart.

Monitoring memory consumption.

A high-precision trend reversal indicator combining RSI exhaustion zones with candlestick breakout patterns.

Connect your MetaTrader 5 account to Telegram. Receive instant notifications every time a trade opens, closes, or gets modified — directly in your phone. This is a notification-only Expert Advisor. It does not place, modify, or close any trades. It monitors your account activity and sends formatted messages to your Telegram chat via the Bot API.

This is a minimalist CRT (Candle Range Theory) visualizer built in under 100 lines, revealing what “picture-perfect” single-timeframe setups actually produce across real markets.

SilviosEAbest26 is a high-precision Expert Advisor for MetaTrader 5, designed to trade market reversals using a sophisticated combination of dynamic price channels and momentum filters. The system is engineered for consistent returns while maintaining strict risk management protocols.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196