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

 
operlay:

I am sending text to telegram from the indicator. But I had to change POST to GET type of request.


Actually the documentation says:

Функция WebRequest() является синхронной, это означает, что она приостанавливает выполнение программы и ждет ответа от запрашиваемого сервера. Так как задержки при получении ответа на отправленный запрос могут быть большими, то функция запрещена для вызовов из индикаторов, поскольку индикаторы работают в едином потоке, общем для всех индикаторов и графиков на данном символе. Задержка выполнения индикатора на одном из графиков символа может привести к остановке обновления всех графиков по данному символу.

Функцию можно вызывать только из экспертов и скриптов, так как они работают в собственном потоке выполнения. При вызове из индикатора 
 
Mikhail Dovbakh:

Actually, the documentation states:

It has sending via dll, and so you can do it in indicators

The problem must be with the headers

Код состояния ответа "HTTP 400 Bad Request" указывает, что сервер не смог понять запрос из-за недействительного синтаксиса.
 
Found the error, 400 error fixed, everything is sending successfully. Thanks for your help! Didn't code the string.
 

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.

 
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.

From my readings from the internet, indicators do not allow webrequests, if someone knows a way around that it would be wonderful, but for now sending messages to Telegram through indicator does not work.

 

Hello,

If my Telegram Channel is Private, How can i find the Channel name? 

if Channel is Public, there is a channel name use in "@xxxxxx"

But if the channel is Private, how can i find that  "@xxxxxx" name?

I want to send the msg to  Telegram Private Channel

 
To Pui Kuen:

Hello,

If my Telegram Channel is Private, How can i find the Channel name? 

if Channel is Public, there is a channel name use in "@xxxxxx"

But if the channel is Private, how can i find that  "@xxxxxx" name?

I want to send the msg to  Telegram Private Channel

Use chat_id 
 
Jefferson Metha:
Use chat_id 

Thanks, how can i get the chat_id ?

 
Is there no way to send messages to closed channels using a bot?
 
Yevhenii Levchenko:
Is there no way to send messages to closed channels using a bot?

If the bot is in the channel and has the right to send messages, you can.