Working with telegram

In order for your robot to send messages to telegram make sure that the following conditions are met:

  1. https://api.telegram.org is added to the list of allowed URLs for web requests.

  2. You have registered your Telegram bot and have access to its token.

Adding the telegram api URL to the list of allowed URLs

Open MetaTrader 5 terminal, go to "Tools-> Options-> Expert Advisors".

Check the "Allow WebRequest for listed URL" checkbox. In the table below, add the following url: https://api.telegram.org

Теперь ваши роботы смогут взаимодействовать с вашим телеграм-ботом.

Telegram bot registration

In order to receive messages via Telegram, you need to register a telegram bot, get its token and simply specify this token in your robot's settings.

  1. Find the @BotFather bot on Telegram. This is an official bot designed specifically for bot management.

  2. Send the following command to this bot: /newbot.

  3. @BotFather will ask you how you want to name your bot, enter the name.

  4. Then, enter username of your new bot

  5. Save the token you receive from @BotFather in a safe place

Keep the token in a safe place and do not send it to anyone! Otherwise, someone else might get control over your bot.

The received token must be specified in the "Telegram" section of your robot's settings:

You can create an unlimited number of telegram bots. Each telegram bot has its own token - in your robot's settings, set the token of the bot from which you want to receive messages.

How to know your Telegram ID

You can know your ID using the @getmyid_bot telegram bot

Last updated