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

MQL5 Source Code Library for MetaTrader 5 - 3

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

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.

Real-time prop firm rule tracker: daily drawdown, max drawdown, profit target progress, trading days count, and challenge status with visual progress bars. Presets for FTMO, MyFundedFX, E8, TFT, and Bulenox. Pure indicator — no trade interference.

Professional trade management panel: one-click Buy/Sell with auto lot sizing, smart trailing stop (ATR/Fixed/Candle), automatic breakeven, multi-TP partial close system (TP1/TP2/TP3), and one-click pending orders. All-in-one order management for serious traders.

This is an experimental Last Structure Break (LSB) price action indicator that uncovers meaningful market structures and potential trading edges through intelligent support and resistance analysis.

ExMachina Safe Scalping is a professional-grade Expert Advisor built for conservative breakout scalping on Gold (XAUUSD), Silver (XAGUSD), and Forex majors.

Include-file class that measures inter-tick latency, filters false alarms via a self-normalising ATR volatility gate, and broadcasts persistent lag alerts to other EAs via GlobalVariable IPC.

Include class that validates combined terminal ping + execution latency before trade operations. Returns false if threshold is exceeded.

Combine Multi Timeframe Trends into one trend using MA.

Draws the previous day High, Low, and Close as horizontal reference lines on the chart for a configurable number of past days. Yesterday's levels extend into today as live support and resistance, with optional touch alerts.

Trade using MA. An easy indicator to identify the trend direction on a specific timeframe.

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

Modern Time Panel for MT5 The Modern Time Panel is a sleek, minimalist custom indicator for MetaTrader 5 that helps you track time with precision. Fixed neatly at the top-right corner of your chart, it displays the current Broker Time, Local Time, and a live countdown to the next candlestick (New Bar). Built with an independent 1-second timer, the countdown continuously runs even when the market is slow or there are no incoming ticks. Fully customizable and dark-mode friendly, it is the perfect non-intrusive tool to ensure you never miss a candle close.

Filter trades by trading sessions (London, NY, Tokyo, Sydney)

This library provides real-time spread monitoring and statistical diagnostics for MetaTrader 5 symbols. It tracks spread evolution using a lightweight circular buffer and computes running metrics such as average, minimum, maximum, and standard deviation. The library classifies current spread conditions into informational states (low, normal, high, extreme) and offers helper methods to query spread behavior and stability. Optional notifications can be enabled to signal unfavorable market conditions. The library is purely analytical: it does not place trades, manage orders, or modify account state, and is intended to be used as a supporting tool inside Expert Advisors or indicators.

Function for modifying open positions and pending orders

Profit/loss calculator of positions (open orders)

monitoring varous trends of timeframes in one timeframes

12345678910...198