DBInvest MT5 AI MCP Plugin
Connect your API from OpenAI, Anthropic, NVIDIA to MT5 directly
DBInvest AI Assistant v2.0
ChatGPT connected - API key loaded
Balance
10,250.00
Equity
10,312.45
P/L
+62.45
Setup guide
Install, permit, compile, and connect
Download & Install DB Investing MT5
Download and install the DB Investing MetaTrader 5 platform before adding the plugin.
Download & Install DB Investing MT5Download MT5 AI MCP Plugin
Download the MT5 AI MCP Plugin package that contains the MQL5 folders.
Download MT5 AI MCP PluginCopy plugin files
Open MT5 > File > Open Data Folder, then copy MQL5\Experts\DBInvest and MQL5\Include\DBInvest into the matching MT5 folders.
Enable MT5 permissions
Turn on algorithmic trading and whitelist https://api.openai.com, https://api.anthropic.com, and https://api.perplexity.ai for WebRequest.
Compile the Expert Advisor
Open MetaEditor with F4, load DBInvest_AI_Assistant.mq5, press F7, and confirm the build shows 0 errors and 0 warnings.
Attach and configure
Drag DBInvest_AI_Assistant onto any chart, allow live trading, choose your AI platform, paste the API key, test, and save.
Before installation
What traders need
DBInvesting MT5 account on the DBInvest-Limited server
Windows 10 or 11 with MetaTrader 5 installed
API key from OpenAI, Anthropic, Perplexity, or a custom endpoint
The DBInvest plugin package with the MQL5 folders
AI platform settings
Choose one API key, switch providers anytime
The Settings panel supports ChatGPT, Claude, Perplexity, and custom OpenAI-compatible endpoints. Add all three WebRequest URLs during setup so users can switch later without touching MT5 options again.
ChatGPT
OpenAI
platform.openai.com
sk-proj-...
Claude
Anthropic
console.anthropic.com
sk-ant-...
Perplexity
Perplexity
perplexity.ai/settings
pplx-...
Inside the panel
Plain English commands with MT5 context
The EA reads live account data, positions, prices, and symbol information, sends the relevant context with the message, then returns analysis or trade instructions for confirmation.
"What is my account balance?"
Shows balance, equity, free margin, and floating P/L instantly.
"Buy 0.05 EURUSD, stop loss at 1.0750"
Prepares the trade and asks for confirmation before execution.
"Show me the last 50 H4 candles for Gold"
Returns OHLCV market data from MetaTrader 5.
"Close all my losing trades"
Closes every negative open position after confirmation.
"Analyze EURUSD on H4 and give me a trade idea"
Generates a market view using live account and symbol context.
"Place a buy limit on USDJPY at 154.50 for 0.02 lots"
Creates a pending order when the request passes confirmation.
Panel controls explained
Status line
Green means API key is loaded and ready. Orange means setup is still needed.
Balance
Live balance, equity, margin, and current P/L.
Balance / Positions
Quick actions that show account details without asking AI.
BUY / SELL
Asks AI to prepare a current-symbol trade with confirmation.
Settings
Change AI platform, API key, model, and maximum trade volume.
Troubleshooting
Common setup fixes
Error 4014
Add the AI API URL in Tools > Options > Expert Advisors > Allow WebRequest.
Invalid API key
Re-paste the key in Settings and use Test Connection before saving.
Panel does not appear
Compile the EA in MetaEditor and confirm the Include folder was copied correctly.
Trade execution failed
Check market hours, free margin, symbol visibility, and minimum lot size.
Security and risk
Designed for control
API keys are stored locally in the MT5 Files directory.
MT5 login credentials never leave the user machine.
Every trade can require a confirmation dialog before execution.
Maximum trade volume limits prevent oversized AI-suggested orders.
Trading leveraged instruments involves significant risk. The AI Assistant is a convenience tool only; users remain responsible for every trading decision and should verify AI-suggested trades before confirming.
Ready to install the DBInvest MT5 AI MCP Plugin?
Download the MT5 AI MCP Plugin and follow the setup steps above to connect your AI API inside MetaTrader 5.