How-To: Automate Notifications from MetaTrader to Telegram – Trading Ideas – 10 May 2023
Are you looking for a way to send automated notifications from MetaTrader to a Telegram channel? Here is your step-by-step guide:
-
Pick the product that matches your version of MetaTrader:
[MT5] [MT4]
Enable MetaTrader to send web requests to Telegram:
“Tools” menu → “Options” → “Expert Advisors” → check “Allow WebRequest for listed URL” and add “https://api.telegram.org”
If you don’t have one yet, create a Telegram Bot and a Channel (see detailed instructions below)
Attach the utility to the chart you want to monitor (or simply drag-and-drop on top of the chart area)
In the Inputs section, enter the Discord Webhook and customize the settings to get notified when and how you prefer
Creating a TelegramBot and finding a channel’s id:
-
Open your Telegram APP and search for “BotFather”
-
Type “/start” and then “/newbot” to create a new bot
-
Give your bot a nickname and username
-
Congratulations! You have created your Telegram bot
-
Save your bot API token, this will be an input to the utility
-
If you don’t already have one, create the channel or group
-
Open the channel/group Info, then Manage, Add Administrators, type the bot username, and click Save
-
Log in with your account to Telegram web and open the above channel/group. In the URL of your web browser you should see something similar to https://web.telegram.org/k/#-XXXXXXXXX
-
Copy the chat id (the last part of the URL, i.e., -XXXXXXXXX)
Inputs:
General Settings
-
Telegram Bot API Token: from the above steps
-
Telegram Chat Id: from the above steps
-
Magic numbers filter:
-
Enter a comma-separated list of magic numbers (e.g., “11111, 22222, 33333”)
-
Or use “ALL” to avoid filtering
-
Symbol filter
-
Enter a comma-separated list of symbols (e.g., “EURUSD,GOLD,[DJI30]”)
-
Or use “ALL” to avoid filtering
-
Time format: pick your preferred format
-
Force pip value: force your own pip value
-
Pip value: custom pip value
Notifications
Screenshot Settings
Messages Formats
-
Customize your message in this section
-
You can enter a mix of text and placeholders to build your messages
-
Use “\n” for a new line
-
Placeholders are all capitalized and will be replaced with the corresponding order information. You can use the you can use the following data points:
-
[TYPE] → Order type
-
[TIME] → Time stamp for the corresponding change in state (created, modified, etc.)
-
[SYMBOL] → Order symbol
-
[TICKET] → Order ticket
-
[SL] → Order stop loss
-
[TP] → Order take profit
-
[SLPIP] → Order stop loss in pips
-
[TPPIP] → Order take profit in pips
-
[ENTRY] → Entry price
-
[RRR] → Risk to reward ratio
-
[LOTSIZE] → Lot size
-
[PROFIT] → Trade profit
-
[PROFITPIP] → Profit in pips
-
[REASON] → Order reason
-
[RISK] → Risk involved in trade
-
[RISKACCOUNTPERCENTAGE] → Risk involved in trade based on account percentage
Happy trading!
Comments are closed.