Sending Emoji's to Telegram using MQL4 code

 

In my MQL4 code I am able to send plain text from mt4 to telegram with ease. However, I am having difficulties adding telegram emojis to my code so that it outputs within telegram. I have searched high and low and all of which I found were examples using php and or python. Tried using plain unicode and bytes but none worked. See code below

if(selSig==1)
       {
 string msg=StringFormat("u'\U00002757'  The New Signal\n --------- \nSymbol: %s\nTimeframe: 
%s\nType: Sell\nPrice: %s\nTake Profit: %s\nStop Loss: %s\nTime: %s",
 _Symbol,
func_timeFrameToString(_Period),
DoubleToString(sigEntry,_Digits),
DoubleToString(sigTp,_Digits),
DoubleToString(sigSl,_Digits),
TimeToString(time[0]));
int res=bot.SendMessage(InpChannelName,msg);
Print(msg);
if(res!=0)
Print("Error: ",GetErrorDescription(res));
  }
}

any help a link or thread whatever would be appreciated.

 

Forum on trading, automated trading systems and testing trading strategies

When you post code please use the CODE button (Alt-S)!

Use the CODE button

 
Sergey Golubev:
thank you
 

Hi you have to pass HTML in the parse_mode field,

Please see the bot API docs.

Telegram Bot API
  • core.telegram.org
The Bot API is an HTTP-based interface created for developers keen on building bots for Telegram. To learn how to create…
 
Marco vd Heijden:

Hi you have to pass HTML in the parse_mode field,

Please see the bot API docs.

thanks will look into it 
 

how i can send emoji to telegram

by expert mql5
 
hnaderplc #:

how i can send emoji to telegram

by expert mql5

Add the emoji code to the message in the call.

 
InsidePossieDOTcom:

In my MQL4 code I am able to send plain text from mt4 to telegram with ease. However, I am having difficulties adding telegram emojis to my code so that it outputs within telegram. I have searched high and low and all of which I found were examples using php and or python. Tried using plain unicode and bytes but none worked. See code below

any help a link or thread whatever would be appreciated.

Dear,

Did you find any way to solve this problem?

BR

 
InsidePossieDOTcom:

In my MQL4 code I am able to send plain text from mt4 to telegram with ease. However, I am having difficulties adding telegram emojis to my code so that it outputs within telegram. I have searched high and low and all of which I found were examples using php and or python. Tried using plain unicode and bytes but none worked. See code below

any help a link or thread whatever would be appreciated.

I solved it by converting the emojis to Unicode. you-%F0%9F%91%8F-can-%F0%9F%91%8F-put-%F0%9F%91%8F-emojis-%F0%9F%91%8F-in-%F0%9F%91%8F-urls-%F0%9F%91%8F/