Synced with GitHub · updated hourly

Expert Advisor Library

1,978 free, open-source expert advisors for MetaTrader 4 and 5, each linked to its source code on GitHub.

19 EAs match Clear filters

This Expert Advisor framework for MetaTrader 4 provides a modular template for building custom trading strategies. It handles complex trade management tasks, including multi-symbol execution, margin-based position capping, and various lot-sizing algorithms such as risk percentage or fixed volume. Risk controls include

MT4 Framework & template Martingale High risk

Modular Trade System

by michaelwade
58 stars

This MetaTrader 4 template provides a modular framework for developing expert advisors. It organizes trading logic into decoupled components including signal engines, order management, and environment checking. The system uses an abstract controller class to handle data processing from multiple sources, such as MACD or

MT4 Framework & template MartingaleIndicator crossover High risk
Updated 6 years ago Apache-2.0 GitHub repository of Modular Trade System

MQL4 Template

by KeisukeIwabuchi
13 stars

This MetaTrader 4 expert advisor provides a foundational framework for developers to create custom automated trading systems. It establishes a structured environment for handling trade signals, entry execution, and exit management. The template includes standard risk parameters such as fixed lot sizing, stop loss, and

MT4 Framework & template
Updated 6 years ago MIT GitHub repository of MQL4 Template

MQL4 Trade Manager

by KeisukeIwabuchi
8 stars

This MetaTrader 4 utility provides a framework for developers to implement event-driven trade monitoring. It replicates the native MQL5 OnTrade function within the MQL4 environment, which lacks a built-in event for position changes. By monitoring the order pool during each price tick, the code detects when trades are o

MT4 Framework & template

MQL4 Logger Class

by RGunning
6 stars

This MQL4 framework provides a structured logging utility for MetaTrader 4 developers to record system events to external files and the terminal console. It allows users to categorize messages across six severity levels: trace, debug, info, warning, error, and critical. The class manages file creation within the platfo

MT4 Framework & template
Updated 6 years ago GPL-3.0 GitHub repository of MQL4 Logger Class

MQL4 Price

by KeisukeIwabuchi
6 stars

MQL4 Price is a development library and utility for MetaTrader 4 that provides functions to convert between different price units including raw price, pips, and points. It serves as a framework for developers to handle decimal digit differences across various currency pairs and symbols. The repository includes a collec

MT4 Framework & template
Updated 8 years ago MIT GitHub repository of MQL4 Price

Orchard Simple EA Template

by OrchardForexTutorials
4 stars

This MetaTrader 4 expert advisor collection serves as a structured framework for building automated trading strategies. The included examples demonstrate how to implement indicator-based entries using the iCustom function, such as MACD and Parabolic SAR crossovers. It manages trades with basic risk controls including f

MT4 Framework & template Indicator crossover

MQL4 Order Module

by KeisukeIwabuchi
4 stars

MQL4 Order Module is a developer framework and library for MetaTrader 4 designed to simplify the selection and management of trading orders. It provides a structured interface for filtering open positions, pending orders, and historical trade data based on magic numbers or ticket IDs. The module includes functionality

MT4 Framework & template
3 stars

MetaTrader Proxy Terminal is a structural framework for MetaTrader 4 designed to decouple trading logic from the client terminal. It provides a specialized architecture for data feeding and order management, allowing developers to protect intellectual property and distribute signals across multiple instances. The syste

MT4 Framework & template
Updated 6 years ago Apache-2.0 GitHub repository of MetaTrader Proxy Terminal
2 stars

This MetaTrader 4 expert advisor and modular framework provides advanced trade management and position scaling capabilities. It features a linear trailing stop that triggers at a predefined profit level and a pyramiding system to add positions to winning trades using a lot multiplier. The code is structured as a librar

MT4 Framework & template Trend followingIndicator crossoverGrid High risk

Framework4o

by Capital-Advisory-Technology
2 stars

Framework4o is a modular system building framework and expert advisor for MetaTrader 4. It provides a structured environment for developing trading models with pre-defined modules for position and risk management. The core functionality handles entry and exit logic using indicators like DEMA, EMA, and RSI. It includes

MT4 Framework & template Trend followingIndicator crossover
Updated 2 years ago GPL-3.0 GitHub repository of Framework4o

MQL4 To CSharp Bridge DNNE

by DennisGundersen
2 stars

This framework provides a prototype and tutorial for connecting MetaTrader 4 MQL code to modern .NET 6+ managed code using Dot Net Native Exports. It functions as a technical bridge rather than a trading robot, allowing developers to extend MetaTrader 4 capabilities with C# libraries. The included Expert Advisor serves

MT4 Framework & template

Swing NNFX Framework

by BenoitDurandIndep
2 stars

This MetaTrader 4 framework provides a modular environment for developing and backtesting expert advisors based on the No Nonsense Forex methodology. It includes functional swing trading robots that utilize baseline indicators, multiple confirmation layers, and volatility filters to identify entries. The system feature

MT4 Framework & template Trend followingMulti-strategy
Updated 3 years ago GPL-3.0 GitHub repository of Swing NNFX Framework

Dv Tools

by dorev
2 stars

Dv Tools is an open-source development framework and utility library for MetaTrader 4. It provides MQL4 programmers with modern C++ inspired data structures, including vectors and maps for handling both primitive types and objects. The library simplifies chart graphic management through a dedicated UI manager and offer

MT4 Framework & template
Updated 5 years ago MIT GitHub repository of Dv Tools

MQL4 File Module

by KeisukeIwabuchi
2 stars

This MetaTrader 4 module provides a simplified interface for file system operations within the MQL4 environment. It functions as a programming library to assist developers in managing files without complex low-level coding. The package includes methods to read and write text data, copy existing files, delete files, and

MT4 Framework & template

MQL4 Unit Test

by KeisukeIwabuchi
2 stars

This MetaTrader 4 framework provides a module for unit testing MQL4 code across multiple simulated account environments. It allows developers to verify function logic by comparing actual execution results against expected values. The tool can cycle through different broker settings using external configuration files to

MT4 Framework & template
Updated 8 years ago MIT GitHub repository of MQL4 Unit Test

HpFX Framework

by mbelgin
1 stars

High Performance Forex (hpFX) is an indicator-agnostic framework for MetaTrader 4 designed for large-scale backtesting and strategy automation. It allows traders to define complex rules by combining up to ten custom indicators as entry signals, confirmation filters, or exit triggers using a flexible string-based encodi

MT4 Framework & template Trend followingIndicator crossoverMulti-strategy
Updated 3 months ago MIT GitHub repository of HpFX Framework

QGA SVM Forex

by TerenceLiu98
1 stars

This repository provides a framework for integrating machine learning and quantum physics models with MetaTrader 4 and 5. It aims to implement a Quantum Genetic Algorithm and Support Vector Machine for feature selection and price classification. The system utilizes a ZeroMQ bridge to connect Python 3.8 with the trading

MT4MT5 Framework & template AI / machine learning
Updated 6 years ago BSD-3-Clause GitHub repository of QGA SVM Forex

Hartono Wen MT4 Scripts

by hartono-wen
1 stars

This MetaTrader 4 repository provides a collection of utility scripts intended for personal use. Its main Expert Advisor functions as a logic framework for developers, specifically designed to execute code exactly once at the start of each new price bar. By comparing the current bar time to the last recorded timestamp,

MT4 Framework & template

Learn how to use expert advisors

Free, plain-English guides: find an EA, install it, set it up, test it and run it safely.

  1. 1Types of EAsRobots, trade managers, copiers and risk tools, and what each is for.
  2. 2Using this librarySearch, filters, badges and what our checks do and do not mean.
  3. 3Install an EA in MT4 or MT5Data folder, compile, attach to a chart and switch on algo trading.
  4. 4EA settings explainedLot size, stop-loss, magic number, max spread and trading hours.
  5. 5Backtest in the Strategy TesterModelling, spread, the report and the over-fitting trap.
  6. 6Choose a safe EAA checklist for the code, the logic, the evidence and the fit.
  7. 7Run an EA 24/7VPS, forward testing on demo and going live small.
  8. 8Open-source EAs on GitHubLicences, compiling in MetaEditor and editing inputs safely.
  9. 9Forex robots: an honest guideWhat automation can and cannot do for you.

About the EA Library

The ForexR EA Library collects open-source expert advisors for MetaTrader 4 and MetaTrader 5 that are published on GitHub. Each entry links to the original repository, so you always get the author's latest code, issues and licence straight from the source. Star counts, last updates and licences are synced from GitHub every hour, and new repositories are added every week.

Every repository is checked automatically before it is listed: it must contain readable MQL source code for a real expert advisor, and repositories that ship executables, hide downloads behind archive passwords or show signs of bought stars are left out. The summaries and tags are written automatically from each repository's README and code. They describe what an EA does; they are not a recommendation, and nothing here is tested or endorsed by ForexR.

Trading with expert advisors is risky. Backtest any EA and run it on a demo account before you trust it with real money. CFDs and leveraged forex are complex instruments with a high risk of losing money rapidly.

EA Library FAQ

What is an expert advisor (EA)?

An expert advisor is a program that runs inside MetaTrader 4 or MetaTrader 5. It can open and close trades on its own, manage trades you opened (trailing stops, break-even, partial closes), protect the account, or connect MetaTrader to other tools such as Telegram or Python. EAs are written in MQL4 (MT4) or MQL5 (MT5).

Are the EAs in this library free?

Yes. Every EA listed here is published on GitHub with its source code, so you can read, download and compile it at no cost. Check each repository's licence before reusing the code in your own projects: some EAs state no licence at all.

Are these EAs safe to use?

ForexR lists only repositories with readable MQL source code and never hosts files. Repositories that ship executables, ask you to disable antivirus, hide downloads behind passwords or show signs of bought stars are left out automatically. That does not make any EA profitable or bug-free: read the code, backtest it in the Strategy Tester and run it on a demo account first.

How do I install an EA in MT4 or MT5?

Download the source from GitHub, open MetaTrader, choose File, then Open Data Folder, and copy the .mq4 (MT4) or .mq5 (MT5) file into MQL4/Experts or MQL5/Experts. Open it in MetaEditor and press Compile, then drag the EA from the Navigator onto a chart and allow algorithmic trading.

How does ForexR choose which EAs to list?

A crawler searches GitHub every week for MetaTrader repositories, reads their code and keeps those that contain a real expert advisor and pass the safety checks. Stars, updates and licences are refreshed from GitHub every hour. Summaries are written automatically from each repository's README and code, so treat them as a guide and check the source.

What do "High risk", grid and martingale mean?

A grid EA opens a ladder of orders at fixed distances; a martingale EA increases the lot size after losses. Both can show smooth equity curves for a long time and then lose a large part of the account in one strong trend. EAs that use either are marked High risk, and you can hide them with the "Hide grid and martingale" filter.

Run EAs with a broker that supports MT4 and MT5

Compare regulated brokers by platform, spreads, minimum deposit and leverage.

Compare brokers