Telegram. Working with Telegram in MetaTrader. Channels and bot

Working with Telegram in MetaTrader. Telegram channels and bot

Working with email and push in MetaTrader
Alert in the indicator. How do you insert Alert and Arrow into your indicator?
Working with email and push in MetaTrader
Alert in the indicator. How do you insert Alert and Arrow into your indicator?

About Telegram in the MetaTrader

Utilizing Telegram within the MetaTrader platform entails the integration of Telegram channels and the development of a Telegram bot.

This enables seamless communication and interaction, enhancing the functionality of the MetaTrader environment.

In this article, we will show you “How to configure the terminal and Expert Advisor to work with the Telegram bot and Telegram channel“.

By using our Expert Advisors for MetaTrader in conjunction with our EAPADPRO panel, you can efficiently stay informed about the opening and closing of new trades, modification of Stop Loss and Take Profit, errors that the Expert Advisor receives, and even receive screenshots of the chart where our Expert Advisor is installed.

You have the opportunity to manage our Expert Advisors via the Telegram bot and request up-to-date information about your account and currency pairs.

In the previous article, we considered the work with Mail and Push notifications in the MetaTrader terminal.

A Telegram bot is a program that automates certain tasks and interacts with users in the Telegram messenger. Information bots provide the user with information such as account Status, Contract Specification, Quotes, and other useful information about a currency pair, screenshots of Expert Advisors working in the terminal, and Managing Expert Advisors from the terminal.

Assistants and Expert Advisors utilities send information about opening, closing, and modifying trade deals in the MetaTrader terminal.
The user receives up-to-date information about current trade deals.

Terminal Setup


In order for the telegram bot and EAPADPRO panel to work with the telegram channel, you need to allow the use of API from Telegram in the terminal settings:

Go to Terminal Options

Expert Advisors tab

Allow EA communication with API telegram.
https://api.telegram.org
Be sure to record https://api.telegram.org in MetaTrader 4.

Creating a bot in Telegram


To work with Telegram and communication between the Telegram bot and the terminal, you need to create a Telegram bot from your Telegram account.

To create a bot, you need to search for the Father of all bots: @botfather
Note: There are a lot of fake accounts now, so be careful.

The /newbot command allows you to create a bot.

Using the Telegram prompts, set the name of the bot and its nickname, be sure to end with _bot,
for example Test333883887_bot

After the successful creation of a Telegram bot, you will receive a unique Telegram bot token.

It is needed to record it in the Expert Advisor settings!

Creating a Telegram Public Channel for Notifications

For the Expert Advisor to work with the Telegram bot, you need to set up the bot on your phone and create a “public” channel.
To receive notifications from your account, you need to assign the bot as an administrator of your “public channel.
Attention! Sending notifications and working with commands requires computer resources!

Use the Telegram bot only for your own needs.

To do this, go to your Telegram – Left menu. New channel.

Using the Telegram tips, create your channel where you will receive notifications from the terminal about new trades and errors.

Be sure to assign your bot (created in the previous section) as your channel Admin.

Creating a Telegram Private Channel for Notifications

For the Expert Advisor to work with the Telegram bot, you need to set up the bot on your phone and create a “private” channel.
To receive notifications from your account, you need to assign the bot as an administrator of your “private channel.
Attention! Sending notifications and working with commands requires computer resources!

Use the Telegram bot only for your own needs.

To do this, go to your Telegram – Left menu. New channel.

Using the Telegram tips, create your channel where you will receive notifications from the terminal about new trades and errors.

Be sure to assign your bot (created in the previous section) as your channel Admin.

To work with a private channel, you need to know the ID of your channel.
To do this, you need to find a bot with the name @username_to_id_bot
Attention! There are a lot of fake channels now. Be careful.

Using the bot’s help, find the channel you need and find out its ID

In the settings of Advisor Expert and EAPADPRO, enter the received ID

Setting up an Expert Advisor to work with Telegram bot

Go to the Expert Advisor Settings and scroll to the bottom.
You will find the settings for working with the Telegram bot:


==TG_Token=”” –> Token bot. Token (unique code) of the bot that will send notifications and receive commands
==TG_ChannelName=”” –> –> Public Channel Name @. Or “private” ID starts -100 of the private channel. That will send notifications about opening/closing/modification/errors and screenshots from the terminal.
==TG_UserNameFilter=”” –> Whitelist Usernames. List of users, starting with @, who can use the bot.
Attention! Sending notifications and working with commands takes computer resources! Use the Telegram bot only for your own needs.
==TG_UseBotTimer=false;//TG_UseBotTimer –> Working with the bot from the phone. You can work with the Telegram bot from your Telegram on the phone and with the terminal (Request screenshots, information, and management of Expert Advisor).

TG_UpdateMode=UPDATE_SLOW –> Update Mode. Timer speed, to receive commands from Telegram bot. The faster the timer runs, the more computer resources will be used! Please do not change it unnecessarily. 2sec,3sec,10sec
==TG_PRIORITY=TG_HOME_VPS –> Priority of work. This is the priority mode when the Telegram bot works on the MetaQuotes VPS server and your home computer.
TG_HOME_ONLY=1, // Only the HOME bot. The Telegram bot works only on the home computer.
TG_VPS_ONLY=2, // Only the VPS bot. The Telegram bot works only on the MetaQuotes VPS server.
TG_VPS_HOME=3, // First VPS bot, second HOME bot. The Telegram bot works on the MetaQuotes VPS server if you upload it to the server. If not, it will work on your home terminal. Check the work on the VPS server every 10 minutes.
TG_HOME_VPS=4, // First HOME bot, second VPS bot. The Telegram bot works on a home computer, but if the home computer/terminal is turned off, it will work on the VPS server from MetaQuotes. Check the VPS server’s work every 10 minutes.
Attention! Screenshots are not available on the VPS server from MetaQuotes!

Write down your bot’s Token and Channel.

In order to receive notifications in your Telegram channel, you need to enable the necessary options in the EAPADPRO panel settings.

==Notice Open TG – Send a notification to the Telegram channel if a trade is open;
==Notice Close TG – Send a notification to the Telegram channel if a trade is closed;
==Notice Modify TG – Send a notification to the Telegram channel if a trade is modified;
==Notice Error TG – Send a notification to the Telegram channel if an error is received;
==ScreenShot TG – Send a screenshot to the Telegram channel if a trade is opened or closed;

After successful setup, you will receive information about your new deals and closed deals on your Telegram channel:

Working with the bot from the phone with OnTimer mode

Work with the telegram bot from your Telegram on the phone and with the terminal (Request screenshots, information, management of Expert Advisor).


Questions?

If you have any questions, please ask them. We do not sell the pig in a poke.

And each of our products can be checked before the purchase.

We appreciate your attitude and wishes for our products and try to keep the quality standard high.

Thank you for being with us!

Do you have a question?

Leave a Reply

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.


    This website uses cookies to improve your experience. By using this website you agree to our Data Protection Policy.
    Read more