Telegram Portfolio and Connection Monitor
- ユーティリティ
-
Ratchatapong Kamonchaet
This system was created with a clear purpose: to bring stability to your financial life. We believe in building a system that allows everyone to enjoy a more comfortable lifestyle, backed by reliable consistency and security. Let this EA work for you and transform your trading into a sustainable - バージョン: 1.0
- アクティベーション: 5
Overview
⭐ Telegram Portfolio and Connection Monitor
Your server in safe hands — Keep an eye on your MT5 accounts anytime, anywhere.
🎯 Why we built this:
As real traders and VPS users, we understand that the biggest concern is not just trading strategies, but "technical risk"—such as internet disconnection, broker connection drops, unexpected VPS downtime, or leaving trading accounts unmonitored while away from the screen.
💡 Key Benefits:
- Peace of Mind (Automated Status Reports): Automated status reports based on set schedules or time intervals give you peace of mind that your server and portfolio are secure.
- On-Demand Check: Want to know your portfolio status right now? Simply type the /check command into the Telegram chat, and the bot will pull live data and send it back to you instantly within seconds.
- All-in-One Portfolio Overview: Get a complete summary of Balance, Equity, and Total P/L across all orders, with a clear breakdown of individual open positions.
- Proactive High Latency Warning: Detects server slowdowns or network lag before they impact execution, notifying you when latency exceeds your predefined threshold.
- Critical Connection Safeguard: Instantly alerts you when MetaTrader 5 loses connection to the broker server, account credentials fail, or network/VPS drops occur, complete with automated recovery and downtime tracking.
- Lightweight & High Stability: Designed specifically as a background utility, it consumes minimal system resources, doesn't slow down your machine, and requires no complex setup.
Settings Guide
This guide explains all configurable input parameters available in the Telegram Portfolio and Connection Monitor settings panel.
1. ⚙️ Telegram Settings
Telegram Bot Token: The API token of your Telegram Bot obtained from @BotFather. Required for authenticating message deliveries and receiving commands.
Telegram Chat ID: The target chat ID or user ID where the monitoring reports will be sent. It also acts as a security filter for incoming commands.
2. 📊 Monitoring Settings
Max Acceptable Ping (ms): The maximum acceptable broker latency threshold in milliseconds. If the ping exceeds this value (and is greater than 0), the status indicator switches to a warning icon ⚠️.
Show Positions in Telegram: Enables or disables the detailed list of currently open trade positions within the status report.
Enable /check command from Telegram: Allows the EA to listen for and respond to the /check command sent from your authorized Telegram chat room on-demand.
3. ⚡Telegram Background Settings
Warning Cooldown (Minutes): Controls the time interval (in minutes) between consecutive warning messages if an abnormal state persists.
4. ⏱️ Operating Mode
Select Operating Mode: Choose how automated reports are triggered.
Interval Mode (Every X hours): Sends reports periodically based on a set hour interval.
Fixed Schedule Mode (Specific times): Sends reports at specific daily times.
5. ⏳ Interval Mode Settings
Send report every X hours: The interval period in hours for sending automated reports (e.g., every 1 hour or 8 hours).
6. 📅 Fixed Schedule Mode Settings
Days Filter: Toggle individual days of the week on or off (set to true for active trading days, false to skip weekends).
Schedule Time & Timezone
Your Local UTC Offset (Timezone): Your local timezone offset relative to UTC (e.g., set to 7 for Thailand/ICT).
Enable Schedule 1 / Local Time 1 (HH:MM): Enables and sets the first daily report time according to your local timezone.
Enable Schedule 2 / Local Time 2 (HH:MM): Enables and sets the second daily report time.
Enable Schedule 3 / Local Time 3 (HH:MM): Enables and sets the third daily report time.
7. 📝 General Settings
Custom Note / Comment: A custom identifier or note appended to the bottom of each report to help distinguish multiple accounts or MT5 terminals.
📖 Telegram Bot Setup & Configuration Guide
This guide covers the step-by-step process of creating a Telegram Bot, obtaining your Chat ID, and configuring Bot Privacy settings via @BotFather to work seamlessly with the Telegram Portfolio and Connection Monitor.
Step 1: Create a Telegram Bot & Get the Bot Token
- Open the Telegram app and search for @BotFather (look for the official verified checkmark badge).
- Tap Start to begin the chat.
- Send the command /newbot to BotFather.
- Enter a Display Name for your bot (e.g., Ratchata Portfolio Monitor).
- Choose a Username for your bot, which must end with the word bot (e.g., ratchata _monitor_bot).
- If the username is taken, BotFather will ask you to choose another. Once successful, BotFather will reply with a welcome message containing your HTTP API (Bot Token) (formatted as a combination of numbers and letters, e.g., 123456789:ABCdefGhIJKlmNoPQRsTUVwxyZ).
- Copy this token and paste it into the Telegram Bot Token field in your EA settings.
Step 2: How to Find Your Chat ID
- Search for a helper bot on Telegram to retrieve your ID, such as @userinfobot or @getmyid_bot.
- Tap Start, and the bot will instantly display your account information.
- Look for the Id line (pure numbers, e.g., 987654321), which represents your personal Chat ID.
- Copy this Chat ID and paste it into the Telegram Chat ID field in your EA settings. (Note: If you want reports sent to a Telegram group, add the bot to your group and use a group ID helper bot to retrieve the group's Chat ID instead).
Step 3: Configuring Bot Privacy Mode via BotFather
By default, Telegram bots have Privacy Mode enabled. When a bot is added to a group chat, it will ignore regular messages or commands like /check unless you explicitly mention the bot's username (e.g., /check@your_bot_name). For private direct chats, this setting has no effect.
If you want your bot to read commands freely without restrictions, follow these steps:
- Return to the @BotFather chat window.
- Send the command /setprivacy.
- BotFather will list your created bots; select the username of your bot.
- Choose the desired status:
- Enable (Default): Keeps privacy mode on. The bot only reads group messages if explicitly mentioned or addressed with a command slash.
- Disable: Turns privacy mode off. The bot can read all messages in group chats where it is a member (recommended if you want smooth and direct execution of the /check command).
- Select Disable, and BotFather will reply with Success! The new state is: DISABLED.
Background Monitoring Warning Cases (4 Scenarios)
The automated background monitoring system is designed to watch over network health and broker server stability 24/7. Warning notifications are categorized into 4 main cases:
-
Case 1: High Latency Warning
-
Trigger Condition: Occurs when the connection to the server is still active, but the ping latency spikes and exceeds the user-defined threshold ( InpMaxPingMs ).
-
Notification Message: Sends a warning ⚠️ displaying the current high ping and a suggestion that the server might be unstable or experiencing lag.
-
-
Case 2: System Recovery (Latency Normal)
-
Trigger Condition: Occurs after the system previously sent a high ping warning (Case 1), and the ping subsequently drops back down to normal limits.
-
Notification Message: Sends a success message ✅ confirming that ping and latency are back to normal limits, along with the latest ping value.
-
- Case 3: Critical Warning (Connection Lost)
- Trigger Condition: Occurs immediately (Real-time) when MetaTrader 5 completely loses connection to the broker server.
- Possible Scenarios:
- Account-related issues, such as incorrect login credentials or an invalid password where the server rejects the connection (the system triggers this alert immediately).
- Network-related issues, such as internet disconnection or VPS loss of connection (the system will send this notification along with recovery after the connection is successfully re-established).
- Case 4: System Recovery (Connection Restored)
- Trigger Condition: Occurs specifically when a critical disconnection state (such as internet or network loss) has been resolved, and "the connection signal has successfully returned to normal."
- Notification Message: Sends a success message ✅ confirming that the connection to the broker has been successfully restored, accompanied by a precise Downtime summary report (tracking from the moment the connection dropped until it was successfully re-established) so users can review the exact offline duration. (The system will send this notification after the connection is successfully re-established).
Support & Contact
If you have any questions or require assistance, please feel free to contact us via MQL5 message or email: ratchata.sys@gmail.com
