Framework & template · MT5

MQL5 AI Libraries Framework

by LLMpsycho

This MetaTrader 5 framework integrates artificial intelligence models into trading strategies through the OpenRouter API.

GitHub stars1
Forks0
Last update1 year ago13 Sep 2025
LicenceNone stated

Overview

MQL5 AI Libraries Framework provides a structured set of libraries for managing multiple AI providers, handling API fallback logic, and parsing natural language outputs into executable trade commands. The included demo expert advisor facilitates automated decision-making using large language models like GLM and Qwen. It includes risk management modules, market data collectors, and emergency stop systems to oversee the automated execution. Trading can be toggled via input parameters, while model selection is managed dynamically to maintain connectivity during API interruptions.

Details

Author

LLMpsycho on GitHub

Type

Framework & template

Platform

MetaTrader 5 (MQL5)

Strategy

AI / machine learning

Markets

Any symbol

Timeframes

M1-M5, M15-H1

Risk profile

No grid, martingale or hedging logic was found in its code or README. That says nothing about how it performs: backtest it first.

Input parameters

Read from SimpleAI_Demo.mq5. Defaults are the author's; change them in the EA's Inputs tab.

NameTypeDefaultDescription
OpenRouterApiKeystring
BackupOpenRouterKeystring
PrimaryAIModelstringz-ai/glm-4.5-air:free
FallbackModel1stringqwen/qwen3-coder:free
FallbackModel2stringmoonshotai/kimi-k2:free
UseCompactFlowboolfalsefalse = 128K flow, true = Compact flow
EnableTradingboolfalseFor downstream logic that checks this flag

How to install it

  1. 1Download the sourceUse "Download source (.zip)" above, or clone LLMpsycho/MQL5-AI-Libraries from GitHub, and unzip it.
  2. 2Open the data folderIn MetaTrader choose File, then Open Data Folder, and go to MQL5/Experts.
  3. 3Copy the filesCopy the .mq5 file into Experts, and any .mqh files into the Include folder the code expects.
  4. 4Compile in MetaEditorOpen the file in MetaEditor and press Compile. Fix any missing includes the compiler reports.
  5. 5Test before you tradeRun it in the Strategy Tester, then attach it to a demo chart and allow algorithmic trading.
Third-party code. ForexR did not write, test or endorse this EA, and the summary above was generated automatically from its README and code. ForexR lists only repositories with readable source code and never hosts files. Read the code, backtest it and use a demo account first; automated trading can lose money quickly.

Similar expert advisors

Roffild Library

by Roffild
120 stars

Roffild Library is an extensive framework and collection of expert advisors for MetaTrader 5 that bridges MQL5 with modern data science tools. It provides functional implementations for machine learning models, specifically Multilayer Perceptron neural networks and Random Forests via the AlgLib library. The project fac

MT5 Framework & template AI / machine learning
Updated 6 years ago Apache-2.0 GitHub repository of Roffild Library

Neural Network Tester Improved

by PhiAlphaInvestments
9 stars

Neural Network Tester Improved is a MetaTrader 5 expert advisor designed as a framework for integrating machine learning models into automated trading. The repository includes a main tester file that references an external neural network library. Currently, the source code provides a basic structure for initialization

MT5 Framework & template AI / machine learning
5 stars

This MetaTrader 5 expert advisor serves as a modular framework for building high-performance trading systems with external connectivity. It utilizes a three-pillar architecture: a bridge interface for REST API communication with external backends, a multi-agent logic system for AI-driven signal generation, and a risk m

MT5 Framework & template AI / machine learning
5 stars

This MetaTrader 5 expert advisor provides a comprehensive framework for training and deploying deep learning models natively within the MQL5 environment. It bypasses external dependencies by implementing Multilayer Perceptron, Recurrent Neural Network, and Long Short-Term Memory architectures directly in the platform.

MT5 Framework & template AI / machine learning
Updated 8 weeks ago None stated GitHub repository of MQL5 Neural Network Library

Prediction App DLL

by LeCray
1 stars

This MetaTrader 5 framework provides tools for integrating machine learning models with algorithmic trading. It features scripts designed to generate training data by exporting price action and technical indicators like RSI, MACD, and Stochastics into CSV formats. The system interfaces with external neural network mode

MT5 Framework & template AI / machine learningTrend following
Updated 5 years ago None stated GitHub repository of Prediction App DLL

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

More frameworks and templates

Need a broker for MT5?

Compare regulated brokers that support MetaTrader, with spreads, minimum deposits and leverage side by side.

Compare brokers