
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
Andrey, thanks for the article!
Can you tell me how to implement sending messages to a bot in the simplest mode - private chats.
It would be possible to send messages to a specific bot via SendMessage().
I have such implementation in another platform, now I'm moving to mt5 and I want to do everything in a similar way.
In Telegram:
- via @BotFather created a bot and received a token.
- Using @MyTelegramID_bot I found out my ID.
Using this token/ID combination, messages are sent to the bot.
Several bots are created, one receives logs, another receives critical errors, the third receives information on transactions. Simple and convenient.
Tell me, how to implement sending messages to bot in the simplest mode - private chats.
In telegram:
- via @BotFather created a bot and received a token.
- Through @MyTelegramID_bot I found out my ID.
With the help of this token/ID mapping, messages are sent to the bot.
Your task can be solved in the following way:
Your problem can be solved like this:
Thank you so much! It worked! I was passing my ID as a term to SendMessage and that's why it didn't work )
How I can send trades from my MT4 to a custom PHP
Andrew, here's another problem.
I have a file ExpertHelper.mqh.
In which I write my functions. Then I connect it in the Expert Advisor and use these functions.
In case of errors and notifications I use similar constructs Print("Error in function ",__FUNCTION__);
But how can I get away from print and use telegram in functions inside the ExpertHelper.mqh file?
What would make the print string actually turn into bot.SendMessage(1111111, "Error in function "+__FUNCTION__);
I can't connect Telegram.mqh in the mqh file, create an instance and then switch it on via OnStart/OnInit, can I?
Artem Voytenko:
I can't connect Telegram.mqh in the mqh file, create an instance and then enable it via OnStart/OnInit, can I?
How i can call function in Class in OnCalculate? to send screenshot when i need with a button for example
Thank you
Hello, after executing getme_result=bot.GetMe() it gives 4014. But through the query in the browser it outputs{"ok":true, "result":{"id":262104403, "first_name": "InvestorBOT", "username": "investorinfo_bot"}}
Can you tell me what the problem is?
Corrected: It was necessary to add https://api.telegram.org to the list of allowed URLs