Connect an AI trading bot to MT5 and cTrader
If you have an AI model or bot that decides when to trade, LOTUX lets it place real orders on your own MT5 or cTrader account through a simple HTTP webhook - no ZeroMQ bridge, no MetaTrader DLL, no plugin to compile. Your AI makes the call; LOTUX authenticates it, applies your risk rules, and executes. LOTUX does not generate signals and does not give advice.
How it works
Whatever runs your AI - a Python script, a serverless function, an automation tool, or a chat bot - sends a small JSON message to your LOTUX webhook when it decides to act. LOTUX checks your secret, applies your risk rules, and forwards the order to your connected account. This is the External Signals path; the webhook guide covers the mechanics in full.
- No ZeroMQ, no MetaTrader plugin, no socket bridge - your AI just makes an HTTP request.
- Works on both MT5 (LotuxBridge EA) and cTrader (LOTUX cBot); the account you target decides the venue.
- Your account rules apply before an order is placed, so an AI mistake still respects the limits you set.
Step-by-step
Connect an account
Connect an MT5 or cTrader account once (create a license → install the EA/cBot → paste the key). See the TradingView guide for the exact connect steps.
Enable External Signals
Open the External Signals app for that account and copy its webhook URL and secret.
Have your AI POST a signal
When your model decides, send a JSON message with your secret and the action plus the fields it needs (a buy / sell needs a symbol and a volume). For retry-safe actions (modify_sl / modify_tp / breakeven / filtered close), add an X-Idempotency-Key and reuse the same value if you retry.
Set your risk rules
In LOTUX, set lot size / max risk / allowed symbols. These apply to every AI signal before an order is placed - your safety net.
Test with one signal
Fire a single test signal. A connected, online account executes it; check LOTUX history and your terminal. Rejections show the reason on your dashboard.
Common ways to wire your AI
- Python: your model calls the webhook directly with a normal HTTP request - see the Python guide.
- No-code (n8n / Zapier): an AI node produces the decision, then an HTTP step posts it - see the n8n & Zapier guide.
- ChatGPT / LLM function calling: the model returns a structured action that your code turns into a webhook - see the ChatGPT guide.
- Telegram bot: a bot that receives your AI's calls forwards them as a webhook - see the Telegram guide.
Point your AI at your own account
This is the exact path LOTUX runs for every AI-driven signal. Choose how you host the bridge - both execute through your own EA/cBot.
Frequently asked questions
- Does LOTUX give me trading signals or AI predictions?
- No. Your own AI or bot decides the trade. LOTUX only authenticates the signal, applies your risk rules, and executes on your account. It is not a broker and not investment advice.
- Do I need a ZeroMQ or MetaTrader bridge for my AI?
- No. The LotuxBridge EA (MT5) or LOTUX cBot (cTrader) already runs on your account. Your AI just sends a JSON webhook to LOTUX - no DLL, no socket bridge to build.
- What if my AI sends a bad signal?
- Your account rules (lot size, max risk, allowed symbols) apply before an order is placed, so a stray AI signal still respects the limits you set.
LOTUX executes orders on your rules - it is not a broker and not investment advice. Trading carries risk; you are responsible for your own account, AI, and settings.