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

To add comments, please log in or register
Andrey Voytenko
26684
Andrey Voytenko  

Eugenio Bravetti:

It's ok?

ok. But if you are working with a private channel, use the Channel ID, not the Channel Name.

Eugenio Bravetti
5033
Eugenio Bravetti  
Andrey Voytenko:

ok. But if you are working with a private channel, use the Channel ID, not the Channel Name.

Hi Andrey

Thanks for your availability

only one question for you....

I have need to send from MQL programm a file or simple information to other MQL programms via internet....(the platforms are in different locations)

With Telegram it's possible for you?

Do you have any suggestions?

Many thanks

Eugenio

Andrey Voytenko
26684
Andrey Voytenko  

Eugenio Bravetti:

With Telegram it's possible for you?

I dont know how to exchange files between Telegram Bots.

Eugenio Bravetti
5033
Eugenio Bravetti  
Andrey Voytenko:

I dont know how to exchange files between Telegram Bots.

Andrey, I confirm you that your code work well on MT4 but not on MT5

The error returned on MT5 are:

2018.06.15 15:12:10.961 Telegram_Signal_EA (EURUSD,M30) CCustomBot::PostRequest res = 1001

2018.06.15 15:12:10.961 Telegram_Signal_EA (EURUSD,M30) CCustomBot::PostRequest _LastError = 5203

2018.06.15 15:12:10.961 Telegram_Signal_EA (EURUSD,M30) Error: Unknown error 1001

thanks

Genio


Fernando Jose Velasco Borea
706
Fernando Jose Velasco Borea  
Hello Andrey,

Thanks a lot for the code! It works great, I just have one brief question:

I made a string to keep my message based on various stuff, like add a specific emoji for buy and for sell alerts and so on, and I came up with the idea of sending a chart Screenshot with each alert, I made the code and I just got a problem, when I use my string variable onto the caption argument of SendPhoto, it returns a BadRequest error, I tesed sending a dummy screen using "Test" into the caption and it worked perfectly, then, I figured out another way to find the problem and I sent "Error is on the text" on the caption and it sent the Screenshot but I found the problem, it sends it to Telegram as "Error+is+on+the+text" So I think that this is caused by the formating of the text to be sent on the WebRequest function, but I don't have enough programming skills to figure out what has to be changed to be able to pass a nice format like:

⬆️New buy trade EURUSD⬆️
▶️Entry point: 1.23456◀️
🔵Take Profit: 1.24000🔵
🔴Stop Loss: 1.22000🔴

As I'm able to do with SendMessage. Would you help me to find out what has to be modified to handle those formats? 

Thanks a lot for the library again! 

Best regards, 
Fernando. 
Nguyen Van Tuan
7676
Nguyen Van Tuan  

Hi,

When i have tested with this Library of  Andrey Voytenkoon MT5, It not work well so i have some more simple step. Any people hit same error can try to change like me:

1. Confirm add https://api.telegram.org to Allow WebRequest for listed URL

2. When you using chat_id (like "-1001301234105") instead @channel_name, you will hit some error with this code so i have change it

And now I confirm after i have do two things above, this library work well in MT5.

Thanks Andrey Voytenko again.

Umar Ismail
13458
Umar Ismail  
Amazing article

thank you Andrey Voytenko 

can you explain for what "UserNameFilter"
thank you
:)
To add comments, please log in or register