HOW TO SETUP Notify To Telegram for MT5

12 October 2021, 02:32
Trinh Dat
6
1 328

https://www.mql5.com/en/market/product/58686


How to get an Chat ID

- Chat with BotFather to create Bot and get API Token of Bot. If you had Bot, skip the step.

- Open the channel/group Info, then Manage, Add Administrators, type the bot username, and click Save

- Send any message to the channel/group like "hello world"

- chat with bot @userinfobot , then forward message on your channel to bot @userinfobot , the bot will reply your channel ID.

Example on picture below: chat ID is minus number -1001448215625



Other way to get Chat ID: use link https://api.telegram.org/bot{token}/getUpdates

then replace {token} by Bot token which you get from Bot Father , open link with Internet browser  or chrome



Important Note

- You must allow WebRequest and add the https://api.telegram.org URL in "Tools" → "Options" → "Expert Advisors".

- Telegram Bot must is member of group or admin of channel.

- Attach it to one chart only.


For Custom Message

- Download file here , then copy the file to folder <Data folder>/MQL5/Files/

- To add Emoji: search Emoji here and get code of Emoji (  Unicode column )

- Below is all variable to add to custom message:

  1. [TICKET]  -> Order Ticket 
  2. [OPENTIME]   -> Order open time
  3. [TYPE]  -> Order type
  4. [SIZE]   -> Order size , order lots
  5. [SYMBOL]  -> Order symbol
  6. [OPENPRICE]  -> Order open price
  7. [S/L]  -> Order stoploss
  8. [S/L-PIPS]   -> Order stoploss in pips
  9. [T/P]  -> Order Takeprofit
  10. [T/P-PIPS]   -> Order Takeprofit in pips
  11. [COMMENT]  -> Order comment
  12. [CLOSEPRICE]  -> Order close price
  13. [CLOSETIME]  -> Order close time
  14. [EXPIRATION]  -> Order expire time
  15. [P/L]  -> Profit in money
  16. [P/L-PIPS]  -> Profit in pips
  17. [RISKREWARD]  -> Risk reward of order
  18. [OLD PRICE]   -> Old open price of pending order
  19. [OLD S/L]   -> Old order sl price
  20. [OLD T/P]   -> Old order takeprofitprice
  21. [ACCOUNT]  -> Account number
  22. [BALANCE]   -> Banlance 
  23. [EQUITY]   -> Equity 
  24. [CURRENCY]   -> Account Currency
  25. [BROKERTIME]   -> Time of broker
  26. [P/L %]  -> Profit percent = Profit / Banlance
  27. [P/L-POINT]  ->  Profit in points



Files:
Share it with friends: