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.

31 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
36 stars

This repository contains the MQL source code used by Forex Strategy Builder Professional to export automated trading strategies to MetaTrader 4 and MetaTrader 5. It serves as a standardized template for executing technical strategies generated by the software, handling order execution and trade management. The EA inclu

MT4MT5 Framework & template Multi-strategyMartingale High risk
Updated 4 years ago None stated GitHub repository of FSB Pro Expert Advisor

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
7 stars

This MetaTrader 4 expert advisor provides a robust framework for developing automated trading strategies. It includes pre-built modules for trend detection using ADX and Moving Averages, alongside pullback entry logic. The template emphasizes risk management, featuring percentage-based lot sizing and adaptive volatilit

MT4 Framework & template Trend followingMean reversionMartingale High risk
Updated 5 years ago None stated GitHub repository of Falcon Trading Bot 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

Metatrader License Framework

by MQL-Development
5 stars

This framework provides a standardized method for developers to implement licensing and serial key validation within MetaTrader 4 and MetaTrader 5 Expert Advisors. It utilizes an external validation library to authenticate users by comparing hardware IDs and product codes against encrypted serial keys. The system inclu

MT4MT5 Framework & template
5 stars

MQL4 Project Templates provides a collection of MQL4 boilerplates designed for MetaTrader 4 developers. It serves as a foundational framework rather than a functional trading robot. The repository includes basic structures for experts, indicators, scripts, classes, and functions. The provided expert advisor template co

MT4 Framework & template
Updated 9 years ago None stated GitHub repository of MQL4 Project Templates

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

Algogene MetaTrader DLL

by algogene-fintech
3 stars

This repository provides a framework and example Expert Advisors that bridge MetaTrader 4 and MetaTrader 5 with the Algogene platform. It utilizes external dynamic-link libraries to establish a WebSocket connection, allowing the system to receive tailored trading signals from Algogene servers for trade entries. Additio

MT4MT5 Framework & template
Updated 4 years ago None stated GitHub repository of Algogene MetaTrader DLL

MQL4 EA Bootstrap

by dnshouse
3 stars

This repository provides a foundational boilerplate for developing Expert Advisors on the MetaTrader 4 platform. It implements an object-oriented structure, separating trading logic into distinct entry and exit classes. The code includes essential utility functions such as new candle detection and trade permission chec

MT4 Framework & template
Updated 6 years ago None stated GitHub repository of MQL4 EA Bootstrap
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

Gartal Inc

by bsAmirHeydar
1 stars

Gartal Inc is a modular trading automation framework and strategy development template for MetaTrader 4. It provides a structured environment for testing various entry and exit logic, including Fair Value Gaps, moving average crossovers, and Donchian channels. The repository focuses on backtesting workflows, featuring

MT4 Framework & template SMC / ICT / price actionIndicator crossoverTrend following
Updated 3 months ago None stated GitHub repository of Gartal Inc

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

EURUSD EA Template

by himi1024
1 stars

This MetaTrader 4 repository hosts a collection of expert advisors based on a standardized automated trading template. The source files are tailored for EURUSD on the M15 timeframe, offering a modular structure for integrating custom entry and exit signals. It includes comprehensive risk management settings, allowing u

MT4 Framework & template
Updated 4 years ago None stated GitHub repository of EURUSD EA Template
1 stars

MT4 Common Functions Library is a developer-focused utility framework for the MetaTrader 4 platform. It provides a collection of encapsulated helper functions designed to simplify common programming tasks in MQL4. The primary functionality involves a flexible file management system capable of creating, reading, and app

MT4 Framework & template

X-15 Framework

by dynamicprogrammingsolutions
1 stars

The X-15 Framework is a modular development template for creating MetaTrader 4 expert advisors. It serves as a foundation for programmers to build custom trading systems by providing pre-built modules for order management, signal processing, and trade filters. The included template features standard risk management con

MT4 Framework & template
Updated 5 years ago None stated GitHub repository of X-15 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

Mt4 Link Framework

by ChamalAB
1 stars

Mt4 Link is an MQL4 server-client communications framework designed for MetaTrader 4. It enables the terminal to interact with external web services via a centralized command system. The framework includes modules for file management, update speed control, and execution delays. A sample implementation demonstrates how

MT4 Framework & template
Updated 6 years ago Custom licence GitHub repository of Mt4 Link Framework

Classic Winner

by kkinzler
1 stars

Classic Winner is an educational MetaTrader 4 expert advisor designed as a structural framework for automated forex trading. The repository provides a template for managing trades with built-in risk controls, including fixed percentage lot sizing and Average True Range based exit points. It features time-of-day filteri

MT4 Framework & template
Updated 7 years ago None stated GitHub repository of Classic Winner

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