首页 > 解决方案 > 使用 MQL4 代码将表情符号发送到 Telegram

问题描述

在我的 MQL4 代码中,我可以轻松地将纯文本从 mt4 发送到电报。但是,我很难将电报表情符号添加到我的代码中,以便它在电报中输出。我搜索了高低,我发现的所有这些都是使用 php 和/或 python 的示例。尝试使用纯 unicode 和字节,但没有奏效。请参阅下面的代码

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));
  }
}

任何帮助链接或线程任何将不胜感激。

标签: pythonmql4

解决方案


推荐阅读