MT4/MT5 Send To Telegram — Complete Step-by-Step User Guide + Download FREE DEMO (Test on Live Chart)

MT4/MT5 Send To Telegram — Complete Step-by-Step User Guide + Download FREE DEMO (Test on Live Chart)

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

🔗 Official Product Links

Public channel: CLICK HERE

✅ FREE DEMO Download (Attached at the Bottom)

I attached DEMO / trial builds for both MT4 & MT5 using the MQL5 Blog Attachments feature. MQL5 will automatically display these files in the attachment block at the very end of this post (below the article).

Demo limitations (important):

  • Runs on DEMO accounts only. If attached to a live/real account, the EA will refuse to run.
  • All Telegram messages are forced to start with [DEMO] (text messages and photo captions).
  • The [DEMO] label is locked — users cannot remove or modify it even if they edit templates/content.
  • Strategy Tester note: Telegram WebRequest does not work in Strategy Tester (no internet access). Please test the demo on a real demo account chart in a normal terminal window (PC/VPS).

1 | What the EA Does

MT5 Send To Telegram EA and MT4 Send To Telegram EA are lightweight notification tools that send trading activity from MetaTrader directly to Telegram.

  • The EA does not open, close, or manage trades – it only monitors your account.
  • It listens for events (new positions, pending orders, SL/TP changes, closed trades, reports), formats them, and sends alerts to Telegram in real time.
  • Multi ChatTarget support: send notifications to multiple Telegram chats/groups/channels using a single input field (comma or new-line separated).
  • Telegram Topics support: route messages into a specific forum topic using -100xxxxxxxxxx:TopicID.
  • Includes a delay engine to group rapid modifications (SL/TP edits, pending changes…) into one clean message.
  • Supports chart screenshots and can send photo + text in one Telegram message (image + caption).
  • Enhanced screenshots (optional): draw Entry / SL / TP levels on the chart before capturing (toggle ON/OFF in inputs).
  • Supports threaded trade messages: SL/TP updates and closing messages can reply to the original open alert, creating a clean thread per trade.
  • Account Safety Alerts (optional): prop-firm friendly warnings for margin level, drawdown/daily loss, spread spikes, and connection/trading status.

Ideal for signal providers, prop-firm traders, account monitoring, or anyone who wants structured MT4/MT5 → Telegram alerts.


2 | System Requirements

  • Platform: MetaTrader 5 build 4150 or later, or a recent stable MetaTrader 4 build.
  • Network: Continuous internet access on the MT4/MT5 machine (PC, VPS, etc.).
  • Telegram: A free Telegram account (mobile or desktop is enough).
  • MT5/MT4 Permission: WebRequest to https://api.telegram.org must be allowed.

3 | Installation & Quick-Start Checklist

Step Action
1 MT5/MT4: Tools → Options → Expert Advisors → tick Allow WebRequest for listed URL and add https://api.telegram.org.
2 Copy MT5SendToTelegram.ex5 into MQL5/Experts (for MT5).
Copy MT4SendToTelegram.ex4 into MQL4/Experts (for MT4).
Restart the corresponding terminal(s).
3 Attach the EA to any chart (MT4 or MT5). Use one chart only per terminal; timeframe does not matter.
4 Choose your connection method (DEFAULT bot or YOUR OWN BOT), then set ChatTarget. See section 4 for details.
5 Set MagicNumber:
  • 0 = monitor all trades on the account.
  • Any other integer = monitor only orders with that MagicNumber.
6 In the Inputs tab:
  • Enable the alert types you need (open, close, SL/TP, pending, reports…).
  • Optionally enable Screenshot Settings (and the Entry / SL / TP overlay feature if desired).
  • Optionally enable Account Safety Alerts (prop-firm monitoring module).
  • Optionally tune the delay engine to reduce noise and group fast changes into one clean message.
7 Press OK. If configured correctly, a green activation message will appear in Telegram with your account details.

4 | Connecting MT4/MT5 ⇄ Telegram

Targeting is one-field: ChatTarget. You can paste any of these:

  • Numeric Chat ID (recommended): 188xxxxxxxx (user) or -100xxxxxxxxxx (group/channel)
  • Public chat username: @channelusername or t.me/channelusername
  • Personal username (for private DM): YourUsername (with/without @)
  • Telegram Topics (forum): -100xxxxxxxxxx:TopicID
  • Multi targets: -100xxx, @channelusername, 188xxx (separate by comma or new lines)
Key rules (important Telegram behavior):
• If you already have the correct numeric Chat ID (-100... for groups/channels, positive for users), you can send immediately (as long as the bot has access).
• For channels: add the bot as Administrator so it can post.
• For public channels/supergroups using @username / t.me: convenient, but if you see “chat not found”, re-check the username and bot permissions.
• For private 1-to-1 users: the user must press Start / send /start to the bot at least once.

4.1 Instant Mode (Default Bot) — fastest for personal use

  1. Open Telegram and message @ShiXiongScalpingTrader_bot (press Start or send /start).
  2. In EA inputs (MT4 or MT5), set ChatTarget = YourUsername (with or without @; t.me/YourUsername also works).
  3. Leave TokenChoice = DEFAULT → press OK.

The EA automatically resolves your Chat ID via the default bot. You don’t need to type any token manually in this mode.

4.2 Pro Mode (Custom Bot / Channel / Group)

  1. Create a bot with @BotFather → copy the TOKEN.
  2. Add the bot to your target chat:
    • Channel: add the bot as Administrator (so it can post messages).
    • Group/Supergroup: add the bot and make sure it can send messages.
    • Private 1-to-1 (DM): the user must open the bot chat and press Start (or send /start) at least once.
  3. In EA Inputs (MT4/MT5):
    • TokenChoice = YOUR_OWN_BOT
    • YourToken = 123456:ABC-DEF
    • ChatTarget = numeric Chat ID, @username, t.me/username, or -100xxxx:TopicID for topics
  4. Optional: set EnableChatIDVerification = true for a one-time handshake (sends a test message to confirm setup).

5 | All Input Groups Explained

Group (in Inputs) Purpose
Telegram Connection Choose connection method: default Telegram bot or your own custom bot. Use one target field: ChatTarget.
  • Numeric Chat ID (-100...) — most reliable.
  • Public username (@channelusername or t.me/...) — convenient for public chats (for channels, make the bot an Administrator).
  • Personal username — auto-resolve private user chat ID (user must press Start / send /start once).
  • Telegram Topics: -100xxxxxxxxxx:TopicID
  • Multi targets: separate multiple targets by commas or new lines.
Message & Delay Settings Toggle alert types:
  • New market positions / orders matched
  • Pending orders placed / modified / cancelled
  • SL/TP modifications on open positions
  • Positions closed
Set a delay (seconds) to group multiple fast changes into one clean message (especially SL/TP edits).
Screenshot Settings Control when a chart screenshot is attached to alerts:
  • On new position opened
  • On order executed / matched
  • On SL/TP modified
  • On position closed
Screenshots are sent as one message (photo + caption). Depending on your build, you may also have:
  • Auto-open traded symbol chart
  • Auto-close chart after capture
  • Screenshot delay
  • Screenshot timeframe selection
  • Entry / SL / TP overlay (optional) for cleaner trade documentation
Account Safety Alerts (PropFirm) Optional account monitoring alerts:
  • Margin Level warning
  • Equity drawdown / daily loss thresholds
  • Spread spike alert
  • Connection / trading status
Includes cooldown to prevent message spam.
Report Settings Enable Daily / Weekly / Monthly / Annual P/L summaries with account statistics.
MagicNumber 0 = monitor all trades on the account. Any other integer restricts alerts to that MagicNumber (ideal for multi-EA setups).
Custom Message Templates Edit the exact text sent to Telegram. Supports HTML formatting and placeholders (see section 6). Great for branding signal alerts or prop-firm monitoring.

6 | Editing Message Templates (Advanced)

The EA comes with ready-to-use templates, but you can fully customize each alert. All templates are in the Inputs tab under CUSTOM MESSAGE TEMPLATES (open, modified, closed, and report messages).

6.1 Placeholder Reference

  • {symbol} – instrument, e.g. EURUSD
  • {type} – Buy / Sell / Buy Limit / Sell Stop…
  • {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>

If a screenshot is enabled for that event, the same template text is used as the caption of the image.

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}

Save the template and press OK → the next closed trade will use your custom wording (with or without screenshots, depending on your Screenshot Settings).


7 | Typical Config Sets

7.1 Manual / Signal Followers

  • MagicNumber = 0 (monitor the whole account).
  • Enable all main alerts (open / close / SL/TP / pending).
  • Screenshot ON for order matched and order closed, OFF for minor edits to save bandwidth.
  • Optionally enable Entry / SL / TP overlay for cleaner documentation.
  • Daily & Weekly reports ON for quick P/L summary.

7.2 Multi-EA Accounts

  • Each trading EA uses its own MagicNumber.
  • Attach one Telegram EA per terminal (MT4 or MT5), not per chart.
  • Set MagicNumber to follow one strategy, or 0 to watch all.
  • Use delay to group frequent SL/TP changes into one clean message.

7.3 Prop-Firm Monitoring

  • Enable Account Safety Alerts (optional) for margin level and drawdown/daily loss warnings.
  • Focus on order closed and SL/TP moved alerts.
  • Daily report ON, others optional.
  • Optionally use screenshots only on position open & close to document each trade with a chart.

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.

The built-in calendar automatically skips weekends and common FX holidays so your statistics remain meaningful.


9 | Troubleshooting & FAQ

Issue Solution
No messages received • Confirm WebRequest URL: MT5/MT4 must allow https://api.telegram.org.
• Check the MT4/MT5 Experts tab for HTTP code 401/403/500.
• Verify TokenChoice / YourToken and ChatTarget in Inputs.
• For private DM: the user must press Start / send /start to the bot once.
• VPS firewall? Open outbound port 443 for HTTPS.
• If using multiple ChatTargets, test each one separately first to isolate the target that fails.
Telegram API Error 400: “Bad Request: chat not found” Usually means wrong ChatTarget (wrong numeric ID / wrong @username) or the bot has no access.
• For private DM: the user must /start the bot once.
• For channels: bot must be an Administrator.
• For private groups/channels: use the correct numeric ID (often -100...) and confirm the bot is added.
• Most reliable fix: use numeric Chat ID directly.
Topic messages not showing (Telegram Topics) • Make sure your group is a Supergroup with Topics enabled.
• Use format: -100xxxxxxxxxx:TopicID (example: -1001234567890:11).
• If the topic ID is wrong, Telegram may reject the message. Try sending to the group without topic first: -100xxxxxxxxxx.
401 / 403 error Wrong token or the bot is not present in the target chat/channel. Re-check bot permissions and ChatTarget.
400 error “there is no photo in the request” • Ensure screenshots are enabled only when the terminal can capture charts properly (chart loaded, symbol available).
• If you trade many symbols, enable auto-open traded symbol chart (if available).
• Temporarily disable screenshots to isolate whether the issue is network vs screenshot capture.
Message too long Edit templates or disable large blocks in reports to keep messages shorter.
Demo build cannot send messages The Strategy Tester has no internet access. Test the demo on a demo account live chart in a normal terminal window (or VPS).

10 | Security & Best Practices

  • Use unique MagicNumbers if multiple EAs trade the same symbol.
  • Never share your custom bot TOKEN publicly or in screenshots.
  • Test templates and screenshot options on a demo account before going live.
  • If you run a signal service: prefer numeric Chat IDs for clients/groups/channels (most stable, least troubleshooting).
  • Update via the MQL5 ► Purchases page — activations remain valid across updates.

🔧 Change Log

📌 v2.30 – Multi Targets, Topics & PropFirm Safety Alerts (27 Jan 2026)

  • Multi ChatTarget support: send notifications to multiple chats/groups/channels at once (comma / new-line separated).
  • Telegram Topics support: post alerts into forum topics using -100xxxxxxxxxx:TopicID.
  • Account Safety Alerts module (optional): margin level, drawdown/daily loss, spread spikes, and connection/trading status warnings.
  • Enhanced screenshots (optional): draw Entry / SL / TP levels on the chart before capturing (toggle ON/OFF).
  • MT5 fix: deposit/withdraw (balance operations) are ignored and no longer trigger trade notifications.

📌 v2.20 – Telegram Connection Reliability & Cleaner Setup UX (07 Jan 2026)

  • Single ChatTarget input: numeric Chat ID (-100.../188...), @channelusername, t.me/channelusername, or a username (auto-resolve for private DM).
  • Improved public channel/supergroup targeting: fewer cases where public chats fail to resolve on first setup.
  • Cleaner Inputs: smarter input sanitization and less confusion during setup.
  • Clearer logs & verification errors for easier troubleshooting.
  • Telegram rule reminder: private DM requires one-time /start; channels require bot as Administrator.

📌 v2.10 – Reliable Screenshots & Smarter Delays (12 Dec 2025)

  • More reliable screenshots (correct symbol capture when trading multiple symbols).
  • Extra screenshot controls (auto-open/auto-close, delay, timeframe selection).
  • More accurate timing for delayed notifications.
  • More stable trade updates (retries when platform is slow).
  • Better special character/emoji handling in messages & photo captions.

📌 v2.00 – Screenshot Alerts & Threaded Messages (11 Dec 2025)

  • Screenshot settings group added.
  • Screenshot + caption sent as one Telegram message (photo + caption).
  • Threaded replies for SL/TP updates and trade close messages.
  • Improved error handling/logging for photo requests.

📌 v1.90 – Chat ID Verification Fix

  • Fixed Chat ID Verification message for custom bot + Chat ID mode.
  • Minor stability and compatibility improvements.

📌 11 Dec 2025 – MT4 v1.80 Release (parity with MT5 v1.80)

  • MT4 release parity with MT5 features (delay, templates, reporting, token encryption, etc.).
  • From this version onward, MT4 & MT5 share a unified change log.

📞 Support

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


Trade safe & stay informed — happy trading! 🚀