Discussion of article "How to create bots for Telegram in MQL5" - page 44

 

Hi everyone 

thanks for this library!

i was wondering if anyone managed to send (upload a file .cvs for example) to a telegram chat room.

and If yes if this could be shared to the community.

Cheers!

[Deleted]  
Indra Lukmana #:

Hi all,


I dunno if this question have been asked previously, 

I tried this modul with EA format and it works wonderfully, however when i tries this modul with indicator format, it shows an error as below:

2020.08.26 10:25:37.839 inLuk_TelegramBot EURUSD,H1: Error: URL does not allowed for WebRequest


any suggestion ? or this modul can't be work on indicator? 

thanks.

I face the same issue.  Have you solved the problem?

 

Hi, I'm creating an EA to trade on Forex and I'm putting a telegram communication function, but when I run the EA it returns an error "Unknown error 1001" what is this error, and how to solve it?


 

Hi,

I think the library is outdated with the InpChannelName parameter. For the input InpChannelName is important to precise the string that is recovered by requesting the method from "getUpdates" from the api of Telegram of your bot.

It looks that InpChannelName is not anymore the explicit name of the channel. So now InpChannelName becomes more in the format "-XXXXXXXXXXXXXX" where X represents the numbers (i think the length of the numbers can vary).

In addition the '@' that was hard coded in the function "sendMessage" of the Telegram.mqh should be removed, otherwise the sendMessage function is not going to work with the new channel id convention.

 
Great article, thank you! And the examples are useful.
 

Andrew, thanks for the interesting material. This is how it remains after 5 years...

I don't know, maybe something has changed in Telegram itself.... the Telegram_Bot_EA article example has this:

if(text == EMOJI_TOP) 
   {
   chat.m_state = 0;
   string msg = (m_lang == LANGUAGE_EN) ? "Choose a menu item" : "Select a menu item.";
   SendMessage(chat.m_id, msg, ReplyKeyboardMarkup(KEYB_MAIN, false, false));
   continue;
   }

And it doesn't work like this.

But this is how the up button works normally:

if(text == "🔝") // EMOJI_TOP
   {
   chat.m_state = 0;
   string msg = (m_lang == LANGUAGE_EN) ? "Choose a menu item" : "Select a menu item.";
   SendMessage(chat.m_id, msg, ReplyKeyboardMarkup(KEYB_MAIN, false, false));
   continue;
   }
 
Jose Eduardo Morales Morales #:

Hi,

I think the library is outdated with the InpChannelName parameter. For the input InpChannelName is important to precise the string that is recovered by requesting the method from "getUpdates" from the api of Telegram of your bot.

It looks that InpChannelName is not anymore the explicit name of the channel. So now InpChannelName becomes more in the format "-XXXXXXXXXXXXXX" where X represents the numbers (i think the length of the numbers can vary).

In addition the '@' that was hard coded in the function "sendMessage" of the Telegram.mqh should be removed, otherwise the sendMessage function is not going to work with the new channel id convention.

You are referring to a private channel which this has been discussed b4. However for public channels the default method works
 
OrelMely #:

Hello everyone!!
please, can someone help me? 

My script always show the same template , doesn't matter which choice, always plot the first one , "default"

 

You should load Template which you want

Then wait some time for client to load the template, then you should capture the picture

Then you should send the picture

 
Mohammadreza Azarnia #:

hi guys , i have run 10 Experts, and get this error in all of them

How to fix this error ?


{"ok":false,"error_code":409,"description":"Conflict: terminated by other getUpdates request; make sure that only one bot instance is running"}

Only one bot to run at a time, you should make few bot if you use multi expert

 
Denis Kirichenko #:

And it doesn't work like that. But the up button works fine like this:

@Denis Kirichenko Thank you for your feedback. I checked the buttons, I have the code for the article working without any problems.