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

MQL4 and MQL5 Source Code Library

icon

You don't know where to start learning the MQL5 or MQL4 programming language? Various programs for your MetaTrader terminal are available here. Download and study published code examples, develop your own indicators and Expert Advisors. Publish your applications in the largest library of MQL5 and MQL4 codes, and they will be available in every MetaTrader terminal and MetaEditor.

Your code examples in MQL4 and MQL5 will be distributed worldwide, and thousands of traders will know about you!

Submit your code

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.

Function for modifying open positions and pending orders

Profit/loss calculator of positions (open orders)

monitoring varous trends of timeframes in one timeframes

Trend based grid Expert Advisor for MetaTrader 5 using EMA and RSI indicators. Dynamic lot size is calculated from account balance with minimum and maximum lot protection. Initial trade opens when price confirms trend direction relative to EMA and RSI levels. Grid orders are added at fixed point distance using controlled multiplier. All trades are managed as a basket and closed at defined profit target or maximum loss level. Includes optional news hour pause and market close filter. No DLL or external services required.

The FMO indicator is a technical analysis tool that measures "trend age" using fractal cycles. Its purpose is to help traders determine whether a trend is still young (safe to follow) or over-aged (high risk). A Conceptual Synthesis of Psychology, Sociology, and Life Cycles This work presents a deep analysis of human life through a numerical matrix (3, 7, 39, 49), using it as a conceptual lens for understanding psychology, sociology, and developmental cycles. It is not a conventional scientific framework. Rather, it is a synthesized model — integrating esoteric, psychological, and sociological perspectives into a unified cyclical structure. The goal is to organize and interpret human development through layered, interacting cycles.

Function for closing positions and deleting orders

Draws colored range boxes for the Asian, London, and New York sessions on any chart. Includes a stats panel showing average session ranges in pips and optional breakout alerts when price exits a session box.

Overbought and oversold indicators aim to determine where the price may experience a reversal.

Function of lot calculation by risk percentage

Find Perfect Timeframe to trade

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196