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

 
seyed mohammad reza aalami #:

Hello friends, I use the following code to send a message to Telegram. My problem is that instead of sending a message once, it sends several times.

please guide me.

Move your code from OnTick to OnInit

 
Hi! How to send message when open, close & modified order ?! Can someone give me some examples, Thanks!
 

this is amazing!! i was wondering if there is a version for MT4? 

looks like this is only working on MT5 

Thank you in advance

 
Burak Tohumcu #:

this is amazing!! i was wondering if there is a version for MT4? 

looks like this is only working on MT5 

Thank you in advance

This very same library works on MT4 just copy and paste to mql4 include files

 

Ok folks,

Are there anybody who may share working code of mt5 buy sell signal to Telegram accounts ?


PS: To the admins; please stop refer to freelance section, thanks :)

 
Hello to all dear friends
I'm using Telegram.mqh in Expert to communicate with Telegram but I'm having problems

1- I can't read the last message sent to the Telegram channel from within Expert

2- I can read the messages sent by users in the group, but I cannot read the messages sent by other Telegram bots.

Thank you for helping me in any problem that you know the solution to
How to create bots for Telegram in MQL5
How to create bots for Telegram in MQL5
  • www.mql5.com
This article contains step-by-step instructions for creating bots for Telegram in MQL5. This information may prove useful for users who wish to synchronize their trading robot with a mobile device. There are samples of bots in the article that provide trading signals, search for information on websites, send information about the account balance, quotes and screenshots of charts to you smart phone.
 
int               GetUpdates()
   {
      if(m_token==NULL)
         return(ERR_TOKEN_ISEMPTY);

      string out;
      string url=StringFormat("%s/bot%s/getUpdates",TELEGRAM_BASE_URL,m_token);
      string params=StringFormat("offset=%d",m_update_id);
      //---
      int res=PostRequest(out,url,params,WEB_TIMEOUT);
      //CJAVal js(NULL,jtUNDEF);
     // if(res==0)
       // Print("");
      if(res==0)
      {
         //Print(out);
         //--- parse result
         CJAVal js(NULL,jtUNDEF);


Here the terminal crashes every time in debug mode. On "if(res==0)" I press F10 and the terminal crashes. I have to restart. res value is 0.

With such logs in the meta-reader:

2022.07.12 10:40:03.212 MQL5 debugger   failed to read string length (00000095 BB7FE075)
2022.07.12 10:40:03.217 MQL5 debugger   failed to read string length (00000095 BB7FE150)
2022.07.12 10:40:03.217 MQL5 debugger   failed to read memory with error 299
2022.07.12 10:40:03.217 MQL5 debugger   failed to read memory (4 bytes from 00000095 BB7FE13C)
2022.07.12 10:40:03.217 MQL5 debugger   failed to read string length (00000095 BB7FE140)
2022.07.12 10:40:03.217 MQL5 debugger   failed to read string length (00000095 BB7FE160)
2022.07.12 10:40:03.217 MQL5 debugger   failed to read memory with error 299
2022.07.12 10:40:03.217 MQL5 debugger   failed to read memory (1 bytes from 00000095 BB7FE0AF)
2022.07.12 10:40:03.217 MQL5 debugger   failed to read memory with error 299
2022.07.12 10:40:03.217 MQL5 debugger   failed to read memory (1 bytes from 00000095 BB7FE0AE)
2022.07.12 10:40:03.217 MQL5 debugger   failed to read memory with error 299
2022.07.12 10:40:03.217 MQL5 debugger   failed to read memory (4 bytes from 00000095 BB7FDFD4)
 
Cuneyt Ates #:

Ok folks,

Are there anybody who may share working code of mt5 buy sell signal to Telegram accounts ?


PS: To the admins; please stop refer to freelance section, thanks :)

Hello the Main Article talks about what you have requested there is infact an EA named Telegram_Signal_EA That does what you have requested

 

Good afternoon.

What can cause this error?

{"ok":false, "error_code":409, "description": "Conflict: can't use getUpdates method while webhook is active; use deleteWebhook to delete the webhook first"}

 
Vasiliy Pushkaryov #:

Good afternoon.

What can cause this error?

{"ok":false, "error_code":409, "description": "Conflict: can't use getUpdates method while webhook is active; use deleteWebhook to delete the webhook first"}

https://core.telegram.org/bots/api#deletewebhook need to do this

Telegram Bot API
  • core.telegram.org
The Bot API is an HTTP-based interface created for developers keen on building bots for Telegram. To learn how to create…