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

 
Thank you so much. Everything works.
 

trying this but it showing "URL does not allowed for WebRequest''. could u please explain more?

 

 


 
Phalkun Thoeun:

trying this but it showing "URL does not allowed for WebRequest''. could u please explain more?

Please add this URLs:

in the "Expert Advisors" tab of the "Options" window.

 

Hi

Thanks for your useful article. I have tried Telegram_signal_EA. but I receive "URL does not allowed for WebRequest " error, in strategy tester. I added suggested URLs but the problem is not solved yet.could u please help me?

 
I have implemented control and management of the Expert Advisor through a system of messages and alerts. In a separate channel I receive reports on its status and work done, and through personal correspondence with the bot I can change the settings of the Expert Advisor. But here I have a question: If someone finds out the bot's name and start commands, then nothing will prevent him from finding it through search and control the EA as well. Is there any way to make it so that the bot can receive messages and process them only from me?
 
Dmitri Custurov:
Is there any way to make the bot able to receive messages and process them only from me?
In the base class CCustomBot is implemented setter UserNameFilter - it is a "white list" of users from whom it is allowed to process messages. @username users can be listed with a space, comma or semicolon.
 
Ok, thanks. If I communicate directly with the bot, it works, if I am in a group and write to it from the group, it does not respond.
 
Dmitri Custurov:
Ok, thanks. If I communicate directly with the bot, it works, but if I am a member of a group and write to it from the group, it doesn't respond.

Try adjusting the code in Telegram.mqh

// line 492
//--- filter
if(m_users_filter.Total()==0 || (m_users_filter.Total()>0 && m_users_filter.SearchLinear(msg.from_username)>=0))
 
And it's working again. Thanks...)))))
 
nima_fad:

I have tried Telegram_signal_EA. but I receive "URL does not allowed for WebRequest " error, in strategy tester.

Thanks for your positive feedback. But WebRequest() function cannot be executed in the Strategy Tester.