Professional Telegram integration library for MetaTrader 5 EAs.

Your EA is running on a VPS and you need to know what it's doing. ASQ Telegram Notifier sends trade alerts, daily summaries, error notifications, and signal broadcasts straight to your phone. Multi-chat support lets you copy alerts to your personal chat, your trading group, and your signal channel simultaneously. Failed messages get queued and retried automatically.

FEATURES:

- Trade open/close/modify notifications with entry, SL, TP, and P/L

- Daily and weekly P/L summaries with win rate, drawdown, and balance

- EA startup and shutdown alerts (know when your EA goes online/offline)

- Error, warning, signal, and custom message support

- Multi-chat support — send to up to 3 Telegram chat IDs simultaneously

- Message queue with retry — 10-slot buffer, 3 auto-retries on failure

- Silent hours — suppress notifications during configurable GMT hours

- Connection health check — VerifyConnection() via Telegram getMe API

- Rate limiting (20 msg/min) to respect Telegram Bot API limits

- Daily message stats (sent/failed counters, auto-reset at midnight)

- Markdown formatting with tag labels ([OPEN], [CLOSE], [DAILY], etc.)

- URL encoding and Markdown character escaping

- WebRequest-based — fully MQL5 Market compliant, no DLLs

SETUP (3 steps):

1. Message @BotFather on Telegram, type /newbot, get your BOT_TOKEN

2. Message @userinfobot on Telegram, get your CHAT_ID

3. In MT5: Tools -> Options -> Expert Advisors -> Add https://api.telegram.org to allowed URLs

DEMO EA INCLUDED:

Attach to any chart with your credentials:

— Sends test message and startup notification on initialization

— Auto-detects closed trades and sends close notifications

— Sends shutdown notification with session P/L on EA removal

— Dashboard shows connection status (Verified/Connected/Not Configured), daily send/error counts, queue status, total messages, and last error

USAGE

#include "ASQ_TelegramNotifier.mqh"
CASQTelegramNotifier tg;
tg.Initialize("YOUR_BOT_TOKEN", "YOUR_CHAT_ID", _Symbol);
tg.AddChatId("GROUP_CHAT_ID");              // Optional 2nd chat
tg.SetSilentHours(true, 22, 6);             // No buzzing at night
tg.VerifyConnection();                       // Check bot token
tg.SendStartup();                            // EA is live
tg.SendTradeOpen(_Symbol, "BUY", 0.10, ask, sl, tp);
tg.Update();                                 // Process queue (call periodically)

Place both files in the same folder — compiles instantly, no subfolder setup needed.

This is the open-source notification engine behind Quant Cristina on the MQL5 Market. Same logic, same accuracy.

FILES:

- ASQ_TelegramNotifier.mqh — Library (708 lines)

- ASQ_TelegramNotifier_Demo.mq5 — Demo EA (256 lines)

MetaTrader 5, all brokers, all instruments, all timeframes.

Free and open-source. 964 lines of production MQL5.