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

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
Has anybody tried BOLD or ITALIC fonts using this library?
I have tried **bold** __italic__ with markdown in the message as follows but no cigar...
"n**boldtext** __italictext__ Balance: $%s parse_mode=MARKDOWN"
**boldtext** __italictext__ Balance: $10056.21 parse_mode=MARKDOWNThe result is:
Never mind....
I found the answer by setting AsHTML flag to true...
bot.SendMessage(InpTelegramId,"<b>Balance: $10056.21</b>",true);
Sorry...
Has anybody tried BOLD or ITALIC fonts using this library?
I have tried **bold** __italic__ with markdown in the message as follows but no cigar...
"n**boldtext** __italictext__ Balance: $%s parse_mode=MARKDOWN"
**boldtext** __italictext__ Balance: $10056.21 parse_mode=MARKDOWNThe result is:
Hi all,
Maybe some of you can help, I'm desperately trying to find a solution to send a local screenshot via MT4 to Telegram.
Quick code snipped
First one works, as I'm getting the message, even if I use @channelname
Second one works only with chatID, which is ok, I can live with it
Third one is throwing me the error:
2020.08.07 21:40:15.175 xxx1: {"ok":false,"error_code":400,"description":"Bad Request: chat not found"}
Any idea, what I'm doing wrong?
Hi all,
Maybe some of you can help, I'm desperately trying to find a solution to send a local screenshot via MT4 to Telegram.
Quick code snipped
First one works, as I'm getting the message, even if I use @channelname
Second one works only with chatID, which is ok, I can live with it
Third one is throwing me the error:
2020.08.07 21:40:15.175 xxx1: {"ok":false,"error_code":400,"description":"Bad Request: chat not found"}
Any idea, what I'm doing wrong?
yes you have to modify the mqh file so that it accepts that negative number.
@Marco vd Heijden thanks!
This is interesting I had a look at Telegram.mqh and I see three functions for SendPhoto, out of which I'm wondering how the code knows which one to use. The third one is anyway out of the question.
First:
Second:
Could it be that the code does not know which one I want to take? I'm trying to trigger the first one, but actually the second one would be better.
Secondly I tried to search in the first function what is happening with _chat_id, but I can only see a simple integer to string conversion:
notice second parameter one is a long the other is a string
and
this is part of mql basics u can have million functions with the same name with different parameters or number of parameters
@Jefferson Metha yes I do understand that, it was just my thought, as it's been so tough to find the issues.
I used now the tips described in https://www.mql5.com/en/forum/89826/page15#comment_17079865, but still not getting anywhere.
I'd like to focus on the sendPhoto function where the input is Channel name, not chat ID, so let's solely focus on one thing.
What I did so far, in Telegarm.mqh in the function
I've modified the following line:
Basically removing the StringTrim function, but it's not getting better.
Finally figured it out.
Changes:
Removed:
And finally in the EA, as simple as:
Hi all,
I dunno if this question have been asked previously,
I tried this modul with EA format and it works wonderfully, however when i tries this modul with indicator format, it shows an error as below:
2020.08.26 10:25:37.839 inLuk_TelegramBot EURUSD,H1: Error: URL does not allowed for WebRequest
any suggestion ? or this modul can't be work on indicator?
thanks.