Introduction
MT5 to Telegram Notification Hub is a user-friendly tool that connects MetaTrader 5 (MT5) with Telegram, enabling seamless transmission of trade alerts, updates, and custom messages directly from MT5 to your Telegram account or channel. You can easily adjust and enable or disable specific parts of the notifications, making it ideal for signal providers and traders who want to keep their audience informed with real-time updates.
Link to the product: https://www.mql5.com/en/market/product/124832
Installation
Setup of the Telegram Bot
- Go to telegram and search https://t.me/BotFather
- Write /newbot , the chat will give you instructions.
- Chose name and username for the bot.
- Send /setuserpic and setup the profile picture for the bot, you can use the logo of the product
- You will get the token from the message provided by BotFather.
Reference for BotFather create a new bot
Add bot to telegram group/chat
- Create telegram group/channel where the bot will be added
- Add the new created bot to the channel and make it admin.
Group Info -> Manage Group -> Administrators -> Add Administrator -> {the bot} -> Save - Write a simple message to
- Get the token provided by BotFather
- Open your browser (Chrome, Firefox, Brave) and access the link https://api.telegram.org/bot{token}/getUpdates (replace the {token} with the token provided)
- Get ChatId from the message provided by URL:
- Get both Token and ChatId and use it later to setup the EA
Open and setup EA
- Open the Expert Advisor and add Token and ChatId in the variables
-
Allow WebRequest for Telegram API - add URL https://api.telegram.org in Allow WebRequest section in MetaTrader application:
Tools -> Options -> Expert Advisors
Now you can enjoy the EA, further setup can be made in the application.
User Interface
Reports Tab
You can get daily, weekly and monthly reports on demand. Pressing one of the buttons will send a message which include reporting details, details that will be customized based on the setup that you made in Reports setup.
App Setup Tab
- General - general settings that affect all orders
- New Order - settings for new order messages
- Close Order - settings for order close messages
- Pending Activ. - settings for pending order activation messages
- Order Modif. - settings for order modification messages
- P. Order Modif - settings for pending order modification messages
- Reports - settings for report message (affect also report messages on demand and also automated reports messages)
General settings
These are the general settings customization.
- Send Message - allow sending messages to Telegram group/channel
- Time Offset - time offset between broker time and VPS time
- BE profit percent - the profit percent that will be consider as break even. If the percent is setup at 0.2% (as in example), if a trade will be close and the profit percent is 0.1%, will be considered as break even, if will have 0.5% that will be considered as winning trade. Same applies also for losing trades, if a trade will have a losing of 0.1% that will be considered also as break even.
- Distance Type - setup that make references to the distance of a trade that can be in pips or pipettes
- Screenshot Width - the width in pixels of a screenshot
- Screenshot Height - the height in pixels of a screenshot
New Order settings
Settings for New Order messages
- Send Messages - allow sending messages for any new orders (active orders or pending orders)
- Send P. Orders - allow sending messages for any new pending order
- Send Screenshot - allow sending screenshot for any new order
- Screenshot Period - setup timeframe for the screenshot
- Show Ticket No. - send ticket number of the order
- Show Volume - send volume of the order
- Show SL - send Stop Loss level setup
- Show TP - send Take Profit level setup
- Show RR - send Risk-Reward ratio of the order, based on the TP and SL levels
- Show Balance - send current balance of the account
- Show Win - send possible win of the new order, based of the TP level
- Show Loss - send possible loss of the new order, based of the SL level
- Show Margin - send the used margin of the account
- Show Free Margin - send the available free margin of the account
- Show Comment - send comment of the order
- Delay Period - IMPORTANT!!!! this the period of seconds which you can delay the sending of the message of the new order to Telegram. This is used when you are used to open a trade and after that you will setup SL and TP levels.
Close Order
Settings for Close Order messages
- Send Message - allow sending close order message
- Show Ticket No. - send ticket number of the order
- Show Entry Price - send the price of the order when was opened
- Show Close Price - send the price of the order when was closed
- Show Profit - send the profit amount of the order
- Show Profit Perc. - send the profit percent of the order
- Show Pips - send the number of pips/pipettes between open price and close price
- Show Volume - send the volume of the order
- Show Duration - send the time duration of the trade
- Show Balance - send the balance of the account
- Show Reason - send the reason which the order was close (manual close, automated close, close due to SL or TP)
- Send Partial Close - allow sending partial close of the order
- Send Perc. Close - send the percentage of the volume closed
Pending Order Activation settings
Settings for Pending Order Activation messages
- Send Message - allow sending message for pending order activation
- Show Ticket No. - send ticket number of the order
Order Modification settings
Settings for Order Modification message, only active orders
- Send Message - allow sending message for order modification
- Show Ticket No. - send ticket number of the order
- Show New Loss - send the new possible loss of the modified order
- Show New Win - send the new possible win of the modified order
Pending Order Modification settings
Settings for Pending Order Modification messages, only pending orders
- Send Message - allow sending message for pending order modification
- Show Ticket No. - send ticket number of the pending order
- Show New Price - send new modified target price for pending order
- Show SL - send new SL level for the pending order
- Show TP - send new TP level for the pending order
Reports settings
Settings for Reports message
- Daily Report - allow for sending automated daily report. This will be send every day at the time specified at Report Time section
- Weekly Report - allow for sending automated weekly report. This will be send every week for the week before, at the time specified at Report Time section, and at the day of the week specified at Report Day Weekly section
- Monthly Report - allow for sending automated monthly report. This will be send every first day of the month, at the time specified at Report Time section
- Custom Report - allow for sending automated custom report. This will be send every day at the time specified at Report Time section, and will be setup for the last number of days specified at Custom Report Days section
- Custom Report Days - set number of days for which the automated custom report to be generated
- Report Time - specify the hour of the reports to be sent
- Report Day Weekly - specify the day of the week for weekly report
- Show Pips - send number of pips/pipettes for every closed trade from the report
- Show Profit - send the profit for every closed trade
- Show Profit Perc. - send the profit percent for every closed trade
- Show Total Pips - show total number of pips/pipettes gained on all closed orders in the report
- Show Total Profit - show total profit for all the closed report in the report
- Show Win Loss BE - show total number of win trades, loss trades and break even trades
- Show Total Orders - show total number of orders
- Show Win Rate - show the percent of win trades
- Active/Pending Orders - show the active and pending orders
Test Messages
This tab is used to test the correct setup of the Telegram settings. You can send a test message for a open order and one for close order.