AI-powered MetaTrader 5 Expert Advisor with DeepSeek LLM market analysis, real-time news filtering, and a Python FastAPI backend for automated forex grid trading.
Grid trading supercharged with LLM reasoning and real-time news intelligence
LLM-powered market analysis generates professional insights, risk scores, and BUY / SELL / HOLD signals with confidence levels.
Breakout-based grid with configurable distance, Fibonacci spacing, and AI-optimized order placement for consistent scalping.
Real-time forex news from 100,000+ sources with sentiment scoring. Caution mode 30 min before high-impact events.
Daily loss limits, drawdown protection, and AI-adjusted position sizing. Trading halts automatically when risk thresholds breach.
Python REST API handles AI computation, risk math, and news processing. Scalable, Docker-ready, with Swagger docs.
Real-time AI status, risk scores, sentiment, technical indicators, and account metrics directly on your MT5 chart.
Two deployment modes: Standalone (EA-only) or FastAPI (EA + Python backend)
METATRADER 5 (Expert Advisor) PYTHON FASTAPI BACKEND
+--------------------------------+ +----------------------------+
| DeepSeekNewsGridScalper | | FastAPI Application |
|--------------------------------| |----------------------------|
| Grid Trading Engine | HTTP/ | DeepSeek AI Service |
| Order Execution | REST | News Intelligence |
| Risk Checks |---------->| Risk Management |
| On-Chart Dashboard | | Position Sizing |
| MQ5 Modules: | | Circuit Breakers |
| - DeepSeekAI.mqh | | Background Scheduler |
| - NewsAPI.mqh | | |
+--------------------------------+ +----------------------------+
| | | |
v v v v
+------------+ +----------+ +------------+ +----------+
| DeepSeek | | NewsAPI | | DeepSeek | | NewsAPI |
| (LLM) | | (News) | | (LLM) | | (News) |
+------------+ +----------+ +------------+ +----------+Five Expert Advisors for different strategies and timeframes
Full-featured standalone EA with AI + News + Grid trading. The flagship system.
Connects to the Python FastAPI backend for scalable, multi-device deployment.
M5-optimized grid scalper for high-frequency trading on lower timeframes.
Fibonacci + ATR trend-following strategy for medium-term positions.
Fibonacci-spaced grid for systematic entries in trending markets.
Live in 5 minutes with the standalone EA — no backend required
Free NewsAPI key (100 req/day) + DeepSeek API — about $5 lasts months at default 5-min interval.
Copy .mq5 to MQL5/Experts and .mqh to MQL5/Include, then compile with F7 in MetaEditor.
Allow api.newsapi.org + api.deepseek.com in WebRequest, attach to EURUSD, enter keys, enable algo trading.
Everything you need to know
An open-source MetaTrader 5 Expert Advisor that combines breakout grid trading with DeepSeek AI LLM market analysis, real-time NewsAPI news filtering, and automated circuit-breaker risk management, with an optional Python FastAPI backend.
DeepSeek AI generates BUY/SELL/HOLD signals with confidence scores, produces a 0-100% risk score from technical, volatility, and news data, dynamically adjusts position sizes and stop losses, and blocks new trades during extreme-risk conditions.
Yes — MIT licensed. Only optional costs: NewsAPI free tier (100 requests/day) and DeepSeek API credits (~$5 lasts months at default settings).
Standalone: Windows + MetaTrader 5. FastAPI mode additionally needs Python 3.11+ or Docker. A VPS is recommended for 24/5 operation.
Liquid majors: EURUSD, GBPUSD, USDJPY, EURGBP. Avoid exotics like USDTRY / USDZAR due to high spreads.
Real-time forex news from NewsAPI with sentiment scoring. 30 minutes before high-impact events, caution mode activates: position sizes cut 50%, spread filters tightened 20%, only high-confidence trades allowed.
Standalone: EA calls AI/news APIs directly from MT5 — simplest setup, great for one terminal. FastAPI: Python backend centralizes AI/risk logic — better for scale, customization, and multi-terminal deployments.
Provided for educational purposes. Always test on demo first, start conservative (1% risk/trade), never trade money you cannot afford to lose. Forex carries substantial risk.
Very little — about $5 in credits lasts several months at the default 5-minute interval, making DeepSeek one of the cheapest LLM options for algorithmic trading.
cd Backend && copy .env.example .env, add your API keys to .env, then docker-compose up -d. Point the EA's BackendURL to http://localhost:8000.
EA Variants
API Endpoints
Risk Controls
Open Source
Free, open-source, and ready to deploy. Combine the power of DeepSeek AI with MetaTrader 5 for intelligent grid trading.
If you find this useful, consider supporting development.
USDT — BEP20 / BSC · Any BEP20 token accepted