Telegram DrawnDown control
- Утилиты
- Версия: 1.0
- Активации: 20
DD Guardian Bot — User Guide
Requirements
- MetaTrader 5 (any broker)
- A Telegram account
Step 1 — Create your Telegram Bot- Open Telegram and search for @BotFather
- Send /newbot and follow the prompts to set a name and username
- BotFather will reply with a Bot Token — copy and save it
- Send any message to your new bot (e.g. /start ) so it can detect your Chat ID
- Open the following URL in a browser to find your Chat ID: https://api.telegram.org/bot<YOUR_TOKEN>/getUpdates Look for "chat":{"id": 123456789} — that number is your Chat ID
Step 2 — Allow WebRequest in MT5
- Go to Tools → Options → Expert Advisors
- Check Allow WebRequest for listed URL
- Add https://api.telegram.org to the list and click OK
Step 3 — Configure EA Inputs
Input Description InpBotToken Your Bot Token from BotFather InpChatID Your Chat ID (numbers only) InpDDThreshold Drawdown % that triggers an alert (default: 5%) InpDDCritical Drawdown % that auto-closes all positions (0 = disabled) InpUseEquityDD true = Equity vs Balance · false = Floating P/L only InpMagicFilter Magic number to monitor (−1 = all orders) InpCheckIntervalSec How often to check drawdown in seconds (default: 5) InpPollingIntervalSec How often to poll Telegram commands in seconds (default: 3) Step 4 — Attach the EA
- Drag DD_Guardian_Bot onto any chart (XAUUSD M1 recommended)
- The EA does not need to be on the same symbol as your trading bots
- If configured correctly, a startup message will appear in your Telegram chat within a few seconds
Telegram CommandsCommand Action /status Show current Balance, Equity, DD%, and open position count /closeall Close all open positions immediately /closeloss Close only positions currently at a loss /closeprofit Close only positions currently in profit /disable Pause DD monitoring (does not close positions) /enable Resume DD monitoring and reset alert state
Alert Behaviour
- When DD exceeds InpDDThreshold , one alert is sent to Telegram. The alert resets automatically once equity recovers by InpDDRecoveryBuffer percent below the threshold, allowing the next alert to fire if DD rises again.
- When DD reaches InpDDCritical , all positions are closed automatically and a critical alert is sent. This fires only once per session.
- A startup message is sent when the EA loads and a shutdown message when it is removed from the chart.
