Discussion of article "How to create bots for Telegram in MQL5" - page 20
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hello,
I am experiencing a small issue with the Telegram Bot EA mt5 - I am able to add additional template in the settings BUT when I test it from the Telegram it is loading only Default template.
Any recommendations or a hand for help?
Thanks in advance!
Please help me with advice. I added theterminal settings. Through the browser the request is executed successfully https://api.telegram.org/bot<token>/sendMessage?chat_id=<id>&text=test
The lines of code below are executed, but SendMessage returns error code 5203 (Error as a result of HTTP request execution). The bot.GetMe() method returns the same 5203 error.
What could be the problem? Thanks!
Alexander,
How did you solve it ?
I ran VPN inside chrome and still gives 5203 .
Tomorrow I'll try on amazan vps.
Thank you very much, it works perfectly !
What exactly works? Are you using the library from this article? What terminal are you using MT4 or MT5 ?
What exactly is working? Are you using the library from this article? What terminal do you use MT4 or MT5 ?
It works both.
It works both ways.
Andrew, the thing is that this library has stopped working for me since some time even through VPN, returning Error: HTTP request failed. Judging by the fact that people at the same time started to post in this and other threads about problems with the telegram API, there is a problem. The solution seems to have been found only for MT5, but they use a different library than this one. Probably the problem appeared after telegram started to accept requests only via TLS 1.2 protocol ... In general, I have not found a solution to the problem yet, and here a person wrote, and you write that everything works.
Andrei, the thing is that since some time this library stopped working even via VPN, returning Error: HTTP request failed. Judging by the fact that people at the same time started to write in this and other threads about problems with telegram API, there is a problem. The solution seems to have been found only for MT5, but they use a different library than this one. Probably the problem appeared after telegram started to accept requests only via TLS 1.2 protocol ... In general, I have not found a solution to the problem yet, and here a person wrote, and you write that everything works.
Do you open https://api.telegram.org/ in your browser?
How do you use this library? Did you add something yourself or run the examples from the article?
Is https://api.telegram.org/ opening in your browser?
Yes, it opens, VPN is enabled, vpn is not in the browser, there is a separate programme on the computer, all traffic goes through it.
How do you use this library? Did you add something yourself or run the examples from the article?
I use only Telegram.mqh library, everything else I wrote myself, in brief - sending/receiving signals about trades.
Now I downloaded the library again, allowed the address, ran the example from the Telegram_Bot_EA article - same error: HTTP request failed.
p.s. tested on MT4
Hello!, I managed to do since they also work on private channels, everything is on the Telegram.mqh, there is a part in the file where the "@" are located, what I did was replaced by "-", and at the time of placing the name of the channel with the variable InpChannelName there place the following "-10014749xxxxx", the token of the channel with the bot
Yes, it opens, VPN is enabled, vpn is not in the browser, there is a separate programme on the computer, all traffic goes through it.
I only use the Telegram.mqh library, everything else I wrote myself, in short - sending/receiving signals about trades.
Now I downloaded the library again, allowed the address, ran the example from the Telegram_Bot_EA article - same error: HTTP request failed.
p.s. tested on MT4
Maybe MT4 allows traffic bypassing VPN? Probably, there are some programs for this.
But I would do it easier:
I can give you my EA to check, but I'm sure the result will be the same, the problem is in the very basic WebRequest.
You can also use a variant with wininet.dll and the usual Windows WebRequest. There were some examples posted here, look for them.