MT5 Send To Telegram — Full User Guide & Demo Download

MT5 Send To Telegram — Full User Guide & Demo Download

8 July 2025, 13:33
The Hung Ngo
0
250

🔗 Official Product Links

1 | What the EA Does

MT5 Send To Telegram EA is a lightweight notification utility. It does not open, close, or manage trades. Instead, the EA listens to your account, formats trade events or periodic statistics, and pushes them straight to Telegram in real time.

Now with a smart delay engine, you can control exactly when and how messages are sent — grouping changes into one clean update.


2 | System Requirements

  • Platform: MetaTrader 5 build 4150 or later
  • Network: Continuous internet access on the MT5 machine
  • Telegram: A free personal account (mobile or desktop)
  • MT5 Permission: WebRequest to https://api.telegram.org  allowed

3 | Installation & Quick-Start Checklist

Step Action
1 MT5 ► Tools → Options → Expert Advisors → tick Allow WebRequest for listed URL and add https://api.telegram.org
2 Copy MT5SendToTelegram.ex5 into MQL5/Experts → restart MT5
3 Attach EA to any chart (one chart only; timeframe irrelevant)
4 Choose connection mode (Username / Custom Bot) – see section 4
5 Set MagicNumber (0 = monitor everything, any other integer = filter)
6 Enable the alert/report options you need in the Inputs tab
7 Press OK → a green “Activated” message appears in Telegram
Demo build: Scroll to the end of this article. The attached .ex5 runs on demo accounts only; live accounts require the Market version.

4 | Connecting MT5 ⇄ Telegram

4.1 Instant Mode (Username) — fastest

  1. Open Telegram and message @ShiXiongScalpingTrader_bot .
  2. The bot replies “Connected”.
  3. In EA inputs set Username = @YourUsername (case-sensitive).
  4. Leave TokenChoice = DEFAULT → press OK.

The EA fetches your Chat ID automatically; no token or Chat ID entry needed.

4.2 Pro Mode (Custom Bot / Channel / Group)

  1. Create a bot with @BotFather → copy the TOKEN.
  2. Add the bot to your private channel/group if desired.
  3. Find the Chat ID (use @getidsbot or similar).
  4. EA inputs:
    • TokenChoice = YOUR_OWN_BOT
    • YourToken = 123456:ABC-DEF
    • IdentifierChoice = ChatID
    • YourChatID = -100xxxxxxxxx
  5. Leave Enable Chat ID Verification = true for a one-time handshake.

5 | All Input Groups Explained

Group (in Inputs) Purpose
Token / Username Choose connection method: default bot + username, or your own bot + Chat ID.
Message & Delay Settings Toggle alert types: order matched, SL/TP edit, pending placed, closed, etc.
Apply delay (in seconds) before sending each type — useful to group signals.
Report Settings Enable daily / weekly / monthly / annual P/L summaries.
MagicNumber 0 = monitor all trades. Any other int restricts to that Magic.
Custom Message Templates Edit exact text sent to Telegram. Supports HTML and the placeholders in section 6.

6 | Editing Message Templates (Advanced)

The EA ships with ready templates, but you can tailor every alert. Each template lives in the Inputs tab under CUSTOM MESSAGE TEMPLATES.

6.1 Placeholder Reference

  • {symbol} – e.g. EURUSD
  • {type} – Buy / Sell
  • {price} – open or entry price
  • {volume} – lots
  • {tp} , {sl}
  • {profit} , {commission} , {swap}
  • {comment}
  • {result} – PROFIT / LOSS label
  • {holdingTime}
  • {reportTime} , {gmtOffset}
  • {winRate} , {maxDrawdown} , {riskRewardRatio} …

Line breaks = |n
Bold = <b>text</b> • Italic = <i>text</i>

6.2 Example – Custom “Order Closed” Template

<b>❌ {type} {symbol} closed {closeReason}</b>|n Result: <b>{result}</b> | P/L: {profit}|n Volume {volume} | Commission {commission} | Swap {swap}|n Held {holdingTime}

Edit, save, press OK → next closed trade uses your wording.


7 | Typical Config Sets

7.1 Manual / Signal Followers

  • MagicNumber = 0
  • Enable all order alerts
  • Daily & Weekly reports ON

7.2 Multi-EA Accounts

  • Each trading EA uses its own Magic
  • One Telegram EA per terminal (not per chart)
  • Set MagicNumber to filter, or 0 to watch all

7.3 Prop-Firm Monitoring

  • Alerts: order closed, SL/TP moved
  • Daily report ON, others OFF
  • Keep message frequency moderate (firm rules vary)

8 | Report Timing Logic

  • Daily – 23:59 platform time, except weekends & major FX holidays
  • Weekly – last trading Friday of each week
  • Monthly – last trading day of each month
  • Annual – last trading day of the year

Schedules auto-skip public-holiday gaps using the built-in calendar.


9 | Troubleshooting & FAQ

Issue Solution
No messages received • Confirm api.telegram.org  is in WebRequest list.
• Check MT5 Experts tab for HTTP code 401/403/500.
• Verify Token or Username/ChatID.
• VPS firewall? Open port 443 outbound.
401 / 403 error Wrong token or bot not present in the target chat.
Message too long Edit template or disable the Open Positions block in reports.
Demo build cannot send messages Strategy Tester has no internet; attach the demo build to a demo account chart instead.

10 | Security & Best Practices

  • Use unique MagicNumbers if multiple EAs share a symbol.
  • Never share your custom bot TOKEN publicly.
  • Test templates on a demo account before going live.
  • Update via the MQL5 ► Purchases page — activations stay intact.

🔧 Change Log

📌 v1.80 – Unified Delay System

  • Delay system now applies to all events: open trades, pending orders, and SL/TP edits.
  • EA waits a few seconds (user-defined) before sending messages, to group all relevant details like SL/TP.
  • Helps signal providers manage free/VIP tiers and reduce clutter.
  • SL/TP delay toggle remains available for full flexibility.

📌 v1.70 – Smart SL/TP Delay

  • Custom delay before sending SL/TP modifications.
  • Gathers multiple updates into one clean message.
  • Reduces spam; improves clarity on rapid SL/TP updates.

📌 v1.60 – Template Editor & Token Encryption

  • Live editing of message templates via Inputs → CUSTOM MESSAGE TEMPLATES.
  • Encrypted token storage (AES-256) for added security with the default bot.
  • Added placeholders: {riskRewardRatio}, {bestHour}, etc.
  • Removed emojis from default templates to comply with Market rules.

📥 Demo Download

The attached MT5SendToTelegram_demo.ex5 works on demo accounts only. Attach it to any chart, follow the steps in section 3, and you’re ready to test.


📞 Support

• Comment under the Market product page • MQL5 inbox @thehung21 Response time < 24 h on business days.


Trade safe & stay informed — happy trading! 🚀