Telegram Control Center (TCC) - Setup Guide v1.20

7 March 2026, 00:44
Nik Andersen
0
4

Telegram Control Center (TCC) - Setup Guide v1.20
By NIKA-QUANT | For MetaTrader 5

1. What Is Telegram Control Center?

Telegram Control Center (TCC) is a utility Expert Advisor for MetaTrader 5 that bridges your trading account with Telegram. It does NOT open trades by itself. Instead, it:

- Monitors your account balance, equity, margin, open positions in real time
- Sends instant Telegram alerts when positions open, close, or get modified
- Warns you about upcoming high-impact economic news events
- Alerts you if equity drawdown exceeds your threshold
- Lets you close positions remotely via Telegram commands (password-protected)
- Takes and sends chart screenshots on demand for any symbol
- Shows a live connection status bar directly on your chart
- Publishes a global variable so your other EAs can read the news window status

TCC attaches to a single chart (e.g. XAUUSD) and monitors your entire account (all symbols, all magic numbers or filtered by a specific magic number).

2. Requirements

- MetaTrader 5 Build 3000 or newer (for Economic Calendar API)
- Telegram Account (free from telegram.org)
- Internet Connection (required for WebRequest to Telegram API)
- Windows OS (standard MT5 requirement)
- No External DLLs - TCC is a single self-contained .mq5 file

3. Step 1: Create Your Telegram Bot

You need a Telegram bot to send and receive messages. Creating one is free and takes about 2 minutes.

3.1 Open BotFather
1. Open Telegram and search for BotFather (the official Telegram bot manager).
2. Start a chat with BotFather and send the command /newbot
3. BotFather will ask for a display name - type any name you like, for example: My TCC Bot
4. Next it asks for a username - this must end in "bot", for example: MyTCCbot
5. BotFather will reply with your Bot Token (a long string)

WARNING: Keep your bot token secret. Anyone with this token can control your bot.

3.2 Set Bot Commands (Optional)
Send /setcommands to BotFather, select your bot, then paste:
status - Account overview
positions - List all open positions
news - Show HIGH impact news events
closeall - Close all positions (requires password)
close - Close specific position (requires password)
pause - Pause alerts (requires password)
resume - Resume alerts (requires password)
screenshot - Take chart screenshot
help - Show all commands

4. Step 2: Get Your Chat ID

The EA needs your Chat ID to know where to send messages.

Method A: Using userinfobot
1. Open Telegram and search for userinfobot
2. Start a chat and send any message
3. The bot will reply with your Chat ID (a number)
4. Copy this number

Method B: Using the Telegram API
1. Send any message to your own bot first
2. Open this URL in your browser (replace YOUR_TOKEN):
3. Look for "chat":{"id":XXXXXXX} - that number is your Chat ID

TIP: For a group chat, the Chat ID will be a negative number. For a private chat, it will be positive.

5. Step 3: Allow WebRequest in MT5

MetaTrader 5 blocks outgoing web requests by default. You must whitelist the Telegram API:

1. In MetaTrader 5, go to Tools > Options
2. Click the Expert Advisors tab
3. Check "Allow WebRequest for listed URL"
4. Click Add and type: https://api.telegram.org
5. Click OK

Also ensure "Allow Algorithmic Trading" is checked.

6. Step 4: Install and Configure the EA

6.1 Install
If purchased from MQL5 Market, the EA installs automatically. Otherwise:
1. Copy TelegramControlCenter.mq5 to your MQL5/Experts folder
2. In MetaEditor, open the file and press F7 (Compile). Ensure 0 errors.
3. The EA should appear in the Navigator panel.

6.2 Attach to a Chart
1. Open any chart (e.g. XAUUSD). The EA monitors your entire account regardless of which chart.
2. Drag the EA from Navigator onto the chart.
3. The Inputs dialog will appear.

6.3 Configure Inputs
Fill in at minimum:
- Bot Token: Paste from BotFather
- Chat ID: Paste from Step 2
- Command Password: Set a password for dangerous commands

6.4 Allow Live Trading
In EA properties > Common tab, check "Allow Algorithmic Trading".
Click OK. The EA will start with a smiley face icon and green status bar.

7. Step 5: Verify Connection

1. Look at the status bar - it should show green with "TG OK"
2. Open your Telegram bot chat and send: status
3. You should receive an account summary
4. Try: help to see all commands

8. Telegram Commands Reference

- status - Account overview (balance, equity, margin, positions)
- positions - List all open positions with details
- news - Last and next HIGH impact events with actual/forecast/previous values
- closeall [password] - Close ALL open positions
- close [ticket] [password] - Close specific position by ticket number
- pause [password] - Pause all alert notifications
- resume [password] - Resume alerts after pause
- screenshot - Screenshot of attached chart
- screenshot [symbol] - Screenshot of any symbol (e.g. screenshot EURUSD)
- help - Show all commands

9. News Filter and Cross-EA Integration

TCC uses the MT5 built-in Economic Calendar. No external data sources needed.

The EA loads upcoming events, caches them (reloads every 60 min by default), and sets a news window active during the Pre/Post event windows (default 15 min each).

Cross-EA Global Variable:
TCC sets a global variable named TCC_NEWS_WINDOW_ACTIVE:
- Value 1.0 = news window active
- Value 0.0 = no news window (safe to trade)

Your other EAs can read this to pause trading during news.

10. On-Chart Status Bar

The status bar at the bottom of the chart shows:
- TG OK (Xs ago) = Connected, last poll X seconds ago
- TG FAIL (N) = Disconnected, N consecutive failures
- TG OFF = Telegram disabled
- NEWS ACTIVE = High-impact news window active
- NEWS -- = No active news window
- PAUSED = Alerts paused

Green background = connected. Red = disconnected.

11. Troubleshooting

- EA not responding: Check WebRequest is allowed for https://api.telegram.org
- Red status bar: Check internet, WebRequest settings, bot token
- Wrong symbol screenshot: Check symbol spelling matches your broker
- Emojis garbled: Update your Telegram client
- News empty: Your broker may not provide calendar data
- Close commands fail: Check password and "Allow Algorithmic Trading"

12. FAQ

Q: Can the EA open trades?
A: No. TCC only monitors and can close positions on command.

Q: Do I need it on every symbol?
A: No. One chart monitors the entire account.

Q: Can I filter by magic number?
A: Yes. Set Magic Number Filter input (0 = all trades).

Q: Does it work with prop firm challenges?
A: Yes. TCC does not open trades and does not violate prop firm rules.

Q: Can other EAs read the news status?
A: Yes, via the TCC_NEWS_WINDOW_ACTIVE global variable.