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 Codes of Expert Advisors for MetaTrader 5

icon

Expert Advisors analyze price charts and trade automatically following underlying rules. Here you can find MQL5 source codes solving a variety of problems. You are able to select both simple Expert Advisors based on moving average crossing and complex ones involving complicated signal generation algorithms and protection against trading mistakes.

You can download and launch offered Expert Advisors in MetaTrader 5. It is recommended that you test and optimize trading robots in the Strategy Tester before using them. The library of Expert Advisors is also available directly from MetaTrader 5 platform and MetaEditor development environment.

Submit your code

The Playground EA series was created for experimentation with Fair Value Gaps (FVGs) and liquidity concepts

This EA is intended to test a popular trading strategy. My own backtest shows that this strategy does not work as it was intended

Utility MT5 EA that sends BUY/SELL deal notifications to Telegram via Bot API (WebRequest)

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

The Expert Advisor works with pending orders Buy Stop and Sell Stop according to the time specified in its input parameters.

The simplest Expert Advisor that analyses the price movement on a given number of bars and opens a corresponding position.

Overview Grid Master EA is an automated trading system that implements a bidirectional grid strategy. It places multiple pending orders above and below the current market price, capturing profits from market oscillations in both directions.

The EA only trades buy positions and does not use Sl and TP.

Professional panel for closing positions with 6 smart filters. Close all, by type, by symbol, or by profit/loss. Real-time P&L display. Perfect for emergency exits and risk management. Includes safety confirmations.

The function calculates the lot size of an open position. The opening price of a deal, the price of stop loss level and the risk per deal in per cent of the deposit are passed as parameters

An example of adding buttons for your advisors. In this example, a button has been implemented to close all active positions for all instruments. In addition to the button event processing functionality, methods for closing positions relative to the symbol name and counting the number of positions relative to the symbol name are also implemented.

An example of a bot with an embedded machine learning model that is trained in python and saved in ONNX format.

The two moving averages crossover strategy is one of the most common trading strategies in the financial market. It is based on the use of two moving averages (usually long and short term) and signals an entry into a position based on their crossover.

Closing martingale trades

EA Tools tính toán Margin theo lotsize, có thể tùy chỉnh đòn bẩy

A simple Expert Advisor that trades when the price forms the "Three From Within" pattern.

Probability Theory Advisor

KopierMaschine is a local copier of trades between different MetaTrader 4 and MetaTrader 5 accounts in any direction located on one computer with an intuitive interface.

Expert Advisor based on iPinBar Pin Bar Finder + several different trailing indicators

A simple strategy based on the signals of two indicators: Williams' Percent Range (WPR) and Bollinger Bands (BB). A position is opened only when the signals of both indicators coincide.

A system to test up to four indicators concurrently in the strategy tester

This is an auxiliary take profit and stop loss tool, which can help you to tight stop loss and dynamic take profit. Updated

I share my code for expert advisor babi ngepet

Simple_Grid is the simplest "grid" EA.

Quantum System - Uses quantum states and probabilities to make decisions.

The RSI Engine EA is a highly versatile automated trading robot for MetaTrader 5, designed to execute trades based on signals from the popular Relative Strength Index (RSI) indicator. Version 2.1 features optimized signal processing and enhanced stability. The EA provides a flexible framework with multiple RSI-based strategies, confirmation filters, and comprehensive trade management settings, making it suitable for both novice and experienced traders.

Introducing MP by SPLpulse, a sophisticated and highly versatile Expert Advisor designed for the modern trader. Whether you are a scalper, a trend follower, or a reversal trader, MP by SPLpulse combines multiple trading strategies with an institutional-grade risk management suite to adapt to your unique trading style. Take control of your trading with unparalleled customization and powerful automation.

Instantly calculate the profit and loss potential of your trades directly on the chart. An essential tool for agile and precise risk management.

Intelligent position protection with one-hedge-per-position logic. Features magic number separation, cooldown timer, and max hedges limit. Prevents infinite hedging loops. Free MIT license.

A lightweight tool for manual scalping in MT5 using keyboard shortcuts

TardioBot V1.05, named after of a historical figure Giuseppe Tardio, is an Expert Advisor designed for MetaTrader 5 that employs a triangular arbitrage strategy.

Expert Advisor for MetaTrader 5 that combines Exponential Moving Averages (EMA) and Relative Strength Index (RSI) to generate trading signals. Includes risk management features and trading time filter.

The Cincin EA (v2.24) is an automated trading system for MetaTrader 5 that executes conservative random trades on a specified symbol (e.g., EURUSD), with features like basket management, hedging, and position control.

CloseAllOrders is a powerful and user-friendly Expert Advisor designed to simplify trade management in MetaTrader 5. With an intuitive button interface directly on your chart, you can close all market positions and pending orders instantly with just one click.

EA Spread lister shows the current, min and max values for all symbols / instruments.

The EA identifies trade setups by waiting for a user-defined number of indicators (e.g., 2 out of 3) to show divergence simultaneously. This multi-layer confirmation approach filters out market noise. Key Features: Triple Confirmation Engine: Analyzes RSI, MACD, & Stochastic divergence. Advanced Filters: Optional Trend Filter (MA) and Volume Filter for superior signal quality. Full Customization: Control all indicator settings, divergence sensitivity, and trade logic. Professional Risk Management: Use fixed lots or percentage-based money management with SL/TP.

Tarantella EA: Advanced grid trading system with hedging capabilities and Market Profile integration. Uses ADX trend filtering, Fibonacci-based grid spacing, and multi-layered entry conditions (RSI/ATR/volume) to execute trades only within Market Profile value areas. Features intelligent risk management including trailing stops, breakeven triggers, and partial hedge closing.

BotCilento is a sophisticated grid-trading Expert Advisor for MetaTrader 5 that combines trend-following signals with adaptive risk management.

Breakout Trader 1.0 trades breakouts from the range.

This expert is a system to help any trader to make a grid of orders.

1234567891011121314151617181920212223242526272829303132333435363738