Trading libraries for MetaTrader 4

Telegram Connector

100.00 USD81.00 USD

Free updates are included

We Accept:

We guarantee that all our
products are 100% authentic


MetaTrader 4
Andrii Ivanov


About MT4 to Telegram

Telegram Connector is a FREE library that joins any EAs with telegram's channels, groups or private chat. Both ways: from MT4 to Telegram and back.

Key features

How to use library? 

1. Add the following code to import funcs:
struct TelegramMessage
   long MessageId;
   string Text;
   datetime TimestampGMT;

#import "Telegram Connector.ex4"
   bool TelegramInit(const string botToken, const long channelId);
   bool TelegramInit(const string botToken, const string channelName);
   void TelegramGetUpdates(TelegramMessage& messages[]);
   string BuildReplyMarkup(const string keyboard, const bool resize = false, const bool
 oneTime = false);
   string BuildReplyKeyboardHide();
   bool TelegramSendText(const string text, const bool htmlMode = false, const string replyMarkup = NULL);
   bool TelegramSendPhoto(const string path, const string title, const bool useCommonFlag = false, const int timeout = 10000);

2. Allow WebRequest for (read more

3. Using @BotFather ( find bot token and populate the following variables:

string channelName = "TelegramChannelName"; // Channel or Group name
4. Init library and send text with emoji
int OnInit()
   if (!TelegramInit(botToken, channelName))
      return INIT_FAILED;

   TelegramSendText("========\n" + WindowExpertName() + " has joined \xF44D" + "\n========");

   EventSetTimer(3); // to check messages every 3 seconds


5. Create screenshot and send to Telegram

   string filename = "tmp.png";
   int width = (int)ChartGetInteger(0, CHART_WIDTH_IN_PIXELS);
   int height = (int)ChartGetInteger(0, CHART_HEIGHT_IN_PIXELS);
   ChartScreenShot(0, filename, width, height);
   string title = _Symbol + " " + EnumToString((ENUM_TIMEFRAMES)_Period);
   StringReplace(title, "PERIOD_", "");
   TelegramSendPhoto(filename, title);

6. Receive messages from Telegram

void OnTimer()
   TelegramMessage messages[];
   for (int i = 0; i < ArraySize(messages); i++)
      Print(TimeToString(messages[i].TimestampGMT, TIME_DATE | TIME_MINUTES | TIME_SECONDS), " ", messages[i].Text);

7. Send custom reply keyboard markup to Telegram (

Warning: only private chats support reply keyboard markup

#define KEYBOARD1    "[[\"\xF5A8 Reporting\"],[\"\xF4B9 Trading\"],[\"\xF4C8 Charts\"]]"


TelegramSendText("Choose your option", true, BuildReplyMarkup(KEYBOARD1));

8. Handle user's choice

void OnTimer()
   TelegramMessage messages[];
   for (int i = 0; i < ArraySize(messages); i++)
      if (StringFind(messages[i].Text, " Reporting") >= 0)
         TelegramSendText("AccountEquity: " + DoubleToString(AccountEquity(), 2), false, BuildReplyKeyboardHide());


1. Cannot call 'Telegram Connector.ex4::TelegramInit', 'Telegram Connector.ex4' is not loaded

Solution: Double check where Terminal has stored "Telegram Connector.ex4" file. For some reasons it can be "\MQL4\Scripts\Market\". Just move file into "\MQL4\Libraries\" folder.


If for any reason you do not like the purchased program, you can request a refund within 14 days from the date of purchase. You can also make an exchange for any other product at an equal cost or by paying the difference.

Simply send a request for refund or exchange with your order number by email:

Refund requests received more than 14 days after purchase will be rejected.

Email Us Now! Support is available 24/7
by Email:

Do You Need Help?
Click Here To Start Live Chat

Contact Us

Copyright © 2021 All rights reserved. Terms and conditions | Privacy policy     We speak your language EN|CN|DE|ES|RU

RISK WARNING: is a software reseller, we do not offer investment advice or execute trades. The software we provide is a tool where the settings are input by the end user to design their own trading strategy. Trading forex and CFDs carry a high degree of risk to your capital and it is possible to lose your entire deposit. Only speculate with money you can afford to lose. As with any trading, you should not engage in it unless you understand the nature of the transaction you are entering, and the true extent of your exposure to the risk of loss. These products may not be suitable for all investors, therefore if you do not fully understand the risks involved, please seek independent advice.