How to send any indicator alert and your EA trades to Telegram in MT5 and MT4
Get your alerts from any indicator, any EA's trades and your price lines in a Telegram chat, group or channel, with a screenshot of the chart, using DuoFX Alert Relay Pro for MT5 or MT4.
Only need alerts from DuoFX tools? The free DuoFX Alert Relay does that, and this guide works for it too (without the sources step).
Full reference: the DuoFX Alert Relay Pro user guide. Discord instead? See How to post trade notifications and indicator alerts to Discord.
Why an indicator cannot do it alone
MetaTrader blocks web requests in indicators, so no indicator can post to Telegram by itself, and most EAs have no Telegram option. Alert Relay Pro is an Expert Advisor that watches indicators, trades and your lines and does the sending. It never trades.
Step 1: create a Telegram bot and copy the full token
- 1. In Telegram, open a chat with @BotFather and send /newbot.
- 2. Choose a name, then a username that ends in bot.
- 3. BotFather replies with the token. It always has two parts: the bot's number, a colon, and a long code, for example 8123456789:AAEx....
Copy the whole token, including the number before the colon. Telegram sometimes selects only the part after the colon when you double tap. If in doubt, send /mybots to BotFather, pick your bot and tap API Token.
Step 2: find the chat id
- Private chat with you: send your bot any message. Open https://api.telegram.org/bot<TOKEN>/getUpdates in a browser (put your token in place of <TOKEN>) and look for "chat":{"id":123456789. A positive number.
- Group: add the bot to the group and post a message there, then open the same getUpdates link. The id is negative and usually starts with -100.
- Channel: add the bot as an admin of the channel. A public channel can use @channelname. A private channel: post in it and read the -100... id from getUpdates.
If getUpdates shows an empty list, send the bot another message and reload the page.

Step 3: allow Telegram in MetaTrader
Tools, Options, Expert Advisors: tick "Allow WebRequest for listed URL" and add https://api.telegram.org. Click OK.
Step 4: attach the relay and test
- 1. Open a chart of a quiet symbol and drag DuoFX Alert Relay Pro onto it.
- 2. In the inputs: Send to Telegram = true, paste the bot token and the chat id. Leave "Attach a chart screenshot" on if you want the chart with each alert.
- 3. Press Send test alert on the panel.
Alerts arrive as a clean card: arrow, BUY or SELL, symbol, timeframe, the source (indicator, EA trade, price line), the message and the server time, with the chart attached.

The panel shows Telegram as ready. If it says "URL not allowed", go back to Step 3. If it asks for the token or chat id, one of them is missing or incomplete.
Step 5: choose what to send
- Trades and price lines are on by default: open or close a trade, or draw a horizontal line named alert ..., and a message arrives.
- Any indicator: in an Indicator slot, type its path as in the Navigator (for example Examples\RSI), its inputs and the buffer to watch. See the user guide for the two modes.
- Arrows drawn by an indicator: switch on "Alert on new chart objects".
- Your own code: RelayProSend("buy", "message"); with the free header from the user guide. DuoFX tools with "Send to DuoFX Alert Relay" arrive too.
Tips
- One Pro per terminal. Several sources on several charts can send at the same time; the relay keeps them in order and sends each once.
- Keep the token private. Anyone with it can post as your bot.
- Alerts older than 5 minutes (default) are skipped after a connection drop, so you do not get a burst of stale signals.
Alerts are information, not trading advice, and can be delayed or lost. Trading carries a high risk of loss.


