3. Nexus Server — Configuration & Operation
The middleware that bridges Telegram and MetaTrader 5
3.1 What Does NexusServer Do?
- Connects to Telegram using your personal account via the official Telegram API
- Monitors configured channels for new messages in real-time
- Parses signal text to extract: trading direction, symbol, entry price, Stop Loss, Take Profit
- Detects Pre-Signal phrases using configurable templates
- Serves parsed signals to the EA via a local HTTP endpoint (
GET /get_trade) - Manages multi-account routing — sends signals to the correct MT5 account based on Account ID
3.2 config.json — All Parameters
NexusServer reads its configuration from config.json in
its installation folder. This file is written by the Configurator — you should not edit it
manually unless absolutely necessary.
{
"FORCE_SYMBOL_IF_MISSING": false,
"SYMBOL_TO_FORCE": "XAUUSD",
"TELEGRAM_BOT": {
"ENABLED": false,
"BOT_TOKEN": "",
"AUTHORIZED_USER_ID": ""
},
"ACCOUNTS": [
{
"ID": "default",
"CHANNELS": [ ... ]
}
]
}
FORCE_SYMBOL_IF_MISSING ⭐ New
Default: falseServer-side enforcement of the forced symbol feature. When true, signals without a detected symbol are automatically assigned SYMBOL_TO_FORCE before being served to the EA.
SYMBOL_TO_FORCE ⭐ New
Default: "XAUUSD"The symbol name injected into symbol-less signals when FORCE_SYMBOL_IF_MISSING is true.
TELEGRAM_BOT.ENABLED
Default: falseEnables an optional Telegram notification bot. When enabled and configured, the bot sends trade confirmation messages to your Telegram.
TELEGRAM_BOT.BOT_TOKEN
The bot token obtained from @BotFather on Telegram. Create a bot via @BotFather and copy the token here.
TELEGRAM_BOT.AUTHORIZED_USER_ID
Your Telegram user ID (numeric). Only this user can receive notifications from the bot. Get your ID via @userinfobot.
3.3 Pre-Signal Phrase Templates
Pre-Signal detection uses phrase templates configured per channel in the Configurator. Templates support two placeholders:
{ACTION}— matches BUY, SELL, LONG, SHORT, and common variations{SYMBOL}— matches any trading symbol in the message
Buy Now — matches any message containing "buy now" (case-insensitive)Scalping {ACTION} {SYMBOL} slowly — matches "scalping buy XAUUSD slowly"Preparing {ACTION} (scalping) — parentheses are valid in templates
3.4 Multi-Account Management
NexusServer can route signals to multiple MT5 instances simultaneously. Each account is identified by its Account ID and receives the same signals (or filtered signals based on channel configuration).
3.5 Server Logs
NexusServer creates log files in its installation directory. Logs include: Telegram connection events, received messages, signal parsing results, pre-signal detections, and errors.
Nexus Server.exe → files named nexus_YYYYMMDD.log3.6 HTTP Endpoint Reference
The EA communicates with NexusServer via HTTP GET requests:
GET http://127.0.0.1:5000/get_trade?account=default
Response (JSON):
{
"signal": "BUY",
"symbol": "XAUUSD",
"entry": 2650.00,
"sl": 2630.00,
"tp1": 2680.00,
"tp2": 2700.00,
"tp3": 0,
"channel": "Gold Signals",
"symbol_forced": false
}