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

 
kayodemizan:

Hi Andrey,  please am getting HTTP request failed


Please help


Thanks


Hi @Andrey Voytenko

I'm getting same problem. It have been happening for months. Please help!

Thank you so much!

 

Hello Andrey, 

Can I say the file is corrupted. HTTP request failed Error persisted. 

 Can I get the file Telegram Bot EA again.

 
kayodemizan:

Hello Andrey, 

Can I say the file is corrupted. HTTP request failed Error persisted. 

 Can I get the file Telegram Bot EA again.

Please Read through the 11 Pages. 

Your issue was long ago solved

 
First thank you for the tutorial. But Does anyone know what to code with chart screenshot included on the signal message?
 
thegosutrader:

Hello,

For those who want to send to a private channel,

1) replace the "@" by "-" in the Telegram.mqh at line 1009 and line 1010 (see attached image),

2) in the mq4 file, you put your channel token starting by -1000xxxx like this: InpChannelName="-10000xxxx";//Channel Name

and you should get the messages after setting your channel to private.

Good luck.

Still does not work ,for inpChannelName do you still use the channel Name or chat ID ?

 
Good afternoon friends. Finally decided to create my own bot in Telegram, but encountered a problem.
Nothing wants to send neither MT4 nor MT5.
Looked through the whole forum, downloaded all the new modules and libraries, but .... alas...
I took the simplest code to check the connection with the bot and...
#include <Telegram.mqh>

input string InpToken="";//Token

CCustomBot bot;
int getme_result;
//+------------------------------------------------------------------+
//| OnInit|
//+------------------------------------------------------------------+
int OnInit()
  {
//--- set token
   bot.Token(InpToken);
//--- check token
   getme_result=bot.GetMe();
//--- run timer
//--- done
   return(INIT_SUCCEEDED);
  }
//+------------------------------------------------------------------+
//| OnDeinit|
//+------------------------------------------------------------------+
void OnDeinit(const int reason)
  {
   Comment("");
  }
//+------------------------------------------------------------------+
//| OnTimer|
//+------------------------------------------------------------------+
void OnTick()
  {
   if(getme_result!=0)
     {
      Comment("Error: ",GetErrorDescription(getme_result));
      return;
     }
//--- show bot name
   Comment("Bot name: ",bot.Name());
  }
//+------------------------------------------------------------------+

It gives only error 1001, which it does not even know.
both in MT4 and MT5.
What to do? I have not found any recommendations.

In the terminal, the request https://api.telegram.org/ is allowed
but here's a strange thing, when requesting this address in Chrome, the page https://core.telegram.org/ opens.

From Chromium bot responds without problems, sees all new messages and sends messages to the channel ...
What to do?

 
Gennady Mazur:
Good afternoon friends. Finally decided to create my own bot in Telegram, but encountered a problem.
Nothing wants to send neither MT4 nor MT5.
Looked through the whole forum, downloaded all the new modules and libraries, but .... alas...
I took the simplest code to check the connection with the bot and...

It gives only error 1001, which it does not even know.
both in MT4 and MT5.
What to do? I have not found any recommendations.

In the terminal, the request https://api.telegram.org/ is allowed
but here's a strange thing, when you request this address in Chrome, the page https://core.telegram.org/ opens.

From Chromium bot responds without problems, sees all new messages and sends messages to the channel ...
What to do?

1001 = API not reachable

Usually when the address is blocked. And with the help of proxy (as you can in the browser) it is not possible to bypass it in the terminal, there is no such setting.

Try in your case only with VPS.
 
Edgar Akhmadeev:

1001 = API not reachable

Usually when the address is blocked. And with the help of proxy (as you can in the browser) it is not possible to bypass it in the terminal, there is no such setting.

In your case you should try only with VPS.

Telegram is not blocked here. Without any VPS, I can access it from both my phone and my computer.

 
Gennady Mazur:

We don't have Telegram blocked. I can access it from both my phone and my computer without any VPN.

Judging by your profile, you're in Russia. Telegram is blocked in Russia... A working application on your phone is not an indicator - they have their own ways around it.
 
To test it, you can install a VPN. Then all devices on your computer will send traffic via VPN