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

 
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


 

When working from the Russian Federation via VPN, everything should work.

We switch on VPN, add https://api.telegram.org to the list of permissions, check the request through the browser - everything is OK.

But from bE5 does not work! For some reason, the native WebRequest function gives an undocumented error with code 1001 on a quite valid GetMe request.

On GetUpdates the same error.

Maybe MQ voluntarily blocks telegram.org in the WebRequest part?

 
No, we don't.

Please attach a minimum working webquest example to servicedesk.
 
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. 
 

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.

 
Amazing article

thank you Andrey Voytenko 

can you explain for what "UserNameFilter"
thank you
:)
 

Good afternoon! In programming is not strong, tell me how to me or write) how to configure that the signals from the indicator arrowman hit my channel Telegram, how to create a channel and a new bot and give him administrator rights, I know, but how to configure the MT4 terminal or what to install there I do not know, help please.

I need messages like this:


 
Andrey Voytenko:

Please update the Telegram.mqh file. It is posted two posts above.

Good evening! Andrey help me to set up sending signals to telegram, my request above in the message

 

Andrey, I got this problem to use Telegram. The error message is: "Error: Unknown error 1001".

Could you help me?

 
Is there this programme for MT5?