Discussion of article "How to create bots for Telegram in MQL5" - page 8 123456789101112131415...55 New comment agsapri 2018.03.20 01:46 #71 agsapri: i change from for(int i=0;i<=1;i++) to for(int i=0;i>=1;i--) on signal ea, now i got no signal from telegram, can help/guide me ;(are need to change in include <Telegram.mqh> #include <Arrays\List.mqh>#include <Arrays\ArrayString.mqh>#include <Common.mqh>#include <Jason.mqh> too? i>=1;i--? Aleksei Beliakov 2018.03.21 10:13 #72 if(index==-1) { m_chats.Add(new CCustomChat); CCustomChat *chat=m_chats.GetLastNode(); chat.m_id=msg.chat_id; chat.m_time=TimeLocal(); chat.m_state=0; chat.m_new_one.message_text=msg.message_text; chat.m_new_one.done=false; } //--- update chat message else { CCustomChat *chat=m_chats.GetNodeAtIndex(index); chat.m_time=TimeLocal(); chat.m_new_one.message_text=msg.message_text; chat.m_new_one.done=false; }this is the code from the int GetUpdates() procedure Yes, the msg structure is filled perfectly, but the only thing copied from it to the pointer to the chat room is chat.m_time=TimeLocal(); chat.m_new_one.message_text=msg.message_text; chat.m_new_one.done=false; Andriy Voitenko 2018.03.21 10:50 #73 If there is not enough information, you can add it this way: chat.m_new_one=msg; Nikita Avramenko 2018.04.19 16:55 #74 Andrey Voytenko:If there is not enough information, you can add it this way: Error pops up in CCustomMessage msg = {0}; and when sending a message to the channel, Error: HTTP request failed. What could be the problem? Andriy Voitenko 2018.04.19 17:38 #75 Nikita Avramenko:The error pops up in CCustomMessage msg = {0};Please update the Telegram.mqh file. It is posted two posts above. Nikita Avramenko 2018.04.25 17:12 #76 Andrey Voytenko:Please update the Telegram.mqh file. It is posted two posts above. Thanks, I didn't pay attention to it. Can the bot read information from the channel it is in? Rashid Umarov 2018.04.26 11:40 #77 Andrey Voytenko:Thank you for the message. However, your corrected version works only with Latin characters.Logically, you should convert the string into a UTF-8 encoded array and insert it as caption in the request body.My variant is in the attachment.I have added this file to the article. Maxim Shershnev 2018.05.15 06:30 #78 Hello everyone. I am not strong in programming, but still decided to make a telegram bot for my channel. Can you tell me how to implement that the bot would send data about open trades to mt4? EA that sends signals Sending MT4 trading notifications Metatrader to Telegram Code DoMINuS13 2018.05.21 12:01 #79 Hmm, something doesn't work at all)) it gives compilation errors Joao Luiz Sa Marchioro 2018.06.08 06:19 #80 Your post on how to use Telegram in MQL5 is incredible. I will study and add to my EAs, so it is easy to know how they are working.You are to be congratulated. 123456789101112131415...55 New comment
i change from for(int i=0;i<=1;i++) to for(int i=0;i>=1;i--) on signal ea,
now i got no signal from telegram, can help/guide me ;(
are need to change in
include <Telegram.mqh>
#include <Arrays\List.mqh>
#include <Arrays\ArrayString.mqh>
#include <Common.mqh>
#include <Jason.mqh> too?
i>=1;i--?
this is the code from the int GetUpdates() procedure
Yes, the msg structure is filled perfectly, but the only thing copied from it to the pointer to the chat room is
If there is not enough information, you can add it this way:
If there is not enough information, you can add it this way:
Error pops up in CCustomMessage msg = {0}; and when sending a message to the channel, Error: HTTP request failed. What could be the problem?
The error pops up in CCustomMessage msg = {0};
Please update the Telegram.mqh file. It is posted two posts above.
Please update the Telegram.mqh file. It is posted two posts above.
Thanks, I didn't pay attention to it.
Can the bot read information from the channel it is in?
Thank you for the message. However, your corrected version works only with Latin characters.
Logically, you should convert the string into a UTF-8 encoded array and insert it as caption in the request body.
My variant is in the attachment.
I have added this file to the article.
Hello everyone.
I am not strong in programming, but still decided to make a telegram bot for my channel.
Can you tell me how to implement that the bot would send data about open trades to mt4?