Download MetaTrader 5

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

To add comments, please log in or register
Sourabh Jain
9
Sourabh Jain  

Thanks for this tutorial ,

I want to make a telegram bot for mt4 please provide me any tutorial for this.

Thanks 

Marco vd Heijden
Moderator
7185
Marco vd Heijden  

How about reading the actual article? https://www.mql5.com/en/articles/2355

It has step-by-step instructions...

You can try it, and if it does not work then post here and we can search for the solution.

How to create bots for Telegram in MQL5
How to create bots for Telegram in MQL5
  • 2016.06.27
  • Andrey Voytenko
  • www.mql5.com
This article contains step-by-step instructions for creating bots for Telegram in MQL5. This information may prove useful for users who wish to synchronize their trading robot with a mobile device. There are samples of bots in the article that provide trading signals, search for information on websites, send information about the account balance, quotes and screenshots of charts to you smart phone.
javan_pedram
5
javan_pedram  
Alireza Soleimani Asl
20
Alireza Soleimani Asl  
Hi i ran my bot and i wanted to send photo. In meta trader opens the chart and save it . and i see bot is sending me photo. but after a little moment everything stops. and i cant recive photo why?
Patrick Witkamp
21
Patrick Witkamp  

Hi,

first of all thanks for the detailed description, much appreciated.

Forgive if this sounds silly but I wanted to try the Telegram_signal_EA and was hoping I could have alerts fired by an indicator being sent to a Telegram channel, however the code you gave for this in the third example, was it written for MT4 or MT5?

When I copy and paste the code into a new file in MetaEditor and compile it, I get a whole bunch of errors and I have no clue what it means, sure I should put in time to figure it all out, but with your given code it shouldn't be all too difficult to be able to achieve what I want right?

If anyone is willing to help me out or point me in the right direction I would really appreciate that.

Best regards,

Patrick

error log



Marco vd Heijden
Moderator
7185
Marco vd Heijden  

The errors are very clear and exactly what they state.

The compiler warns you that it is unable to find the include file.

The include file holds the missing functions which is why additional errors are generated.

You have to make sure that the file telegram.mqh exists in the files folder.

Start there as there are more errors which seem to be related to other code issues.
Franky Frentiono Nangoy
195
Franky Frentiono Nangoy  

Is it possible to make it from custom indicator instead of expert advisor?

Andrey Voytenko
26812
Andrey Voytenko  
Franky Frentiono Nangoy:

Is it possible to make it from custom indicator instead of expert advisor?

If you try to call the function WebRequest from an indicator, GetLastError() will return error 4014 — "Function is not allowed for call".

To do this, you need to remake the project to work with Wininet.dll from indicators.

Documentation on MQL5: Common Functions / WebRequest
Documentation on MQL5: Common Functions / WebRequest
  • www.mql5.com
Common Functions / WebRequest - Reference on algorithmic/automated trading language for MetaTrader 5
Franky Frentiono Nangoy
195
Franky Frentiono Nangoy  
Andrey Voytenko:

If you try to call the function WebRequest from an indicator, GetLastError() will return error 4014 — "Function is not allowed for call".

To do this, you need to remake the project to work with Wininet.dll from indicators.


thank you, will take a look at it

Marco vd Heijden
Moderator
7185
Marco vd Heijden  

look in the

<Telegram.mqh>
{ 
   "ok":true,
   "result":[ 
      { 
         "update_id":349778698,
         "message":{ 
            "message_id":2,
            "from":{ 
               "id":198289825,
               "first_name":"Andriy",
               "last_name":"Voitenko",
               "username":"avaticks"
            },
            "chat":{ 
               "id":198289825,
               "first_name":"Andriy",
               "last_name":"Voitenko",
               "username":"avaticks",
               "type":"private"
            },
            "date":1459775817,
            "text":"\/start"
         }
      }
   ]
}
To add comments, please log in or register