How do I add emojis to my telegram messages?
Below is the code but it does not print the emoji when a message is sent.
Hello .
Here is an example of 2 emojis for 2 separate uses for telegram . the x emoji and the check mark emoji .
string check_emoji_for_buttons="\\u2705"; string check_emoji_for_text="\x2705"; string x_emoji_for_buttons="\\u274C"; string x_emoji_for_text="\x274C";
You refer to a list of codes for emojis here .
In that list the code for check emoji is "U+2705" so for a button markup you turn it to \\u2705 and for text \x2705
Hello .
Here is an example of 2 emojis for 2 separate uses for telegram . the x emoji and the check mark emoji .
You refer to a list of codes for emojis here .
In that list the code for check emoji is "U+2705" so for a button markup you turn it to \\u2705 and for text \x2705
I have tried it and it didnt work.
here is the new code
if(Notify_Modify) for(int i=0; i<ArraySize(OldOrders); i++) { if(OrderTicket()!= OldOrders[i].ticket) continue; string msg = "Order modified: \n"; string x_emoji_for_buttons="\\u274C"; msg += "Ticket: " + (string)OrderTicket()+"\n"; bool modify = false; if(OrderStopLoss()!= OldOrders[i].stoploss) { modify = true; msg += "Stop loss: " + PriceToString(OldOrders[i].stoploss,digit) + " -> " + PriceToString(OrderStopLoss(),digit) + "\n"; } msg += "Time: " + TimeToString(TimeCurrent()+3600,TIME_MINUTES|TIME_MINUTES)+"\n"; // Time modification of 1 hour msg += "Type: " + TypeToStr(OrderType())+"\n"; if(Include_Lots) msg += "Size: " + (string)OrderLots()+"\n"; msg += "Symbol: " + symbol+"\n"; if(OrderOpenPrice()!= OldOrders[i].openprice) { modify = true; msg += "Open price: " + PriceToString(OldOrders[i].openprice,digit) + " -> " + PriceToString(OrderOpenPrice(),digit) +"\n"; } else msg += "Open price: " + PriceToString(OrderOpenPrice(),digit) + "\n"; if(OrderTakeProfit()!= OldOrders[i].takeprofit) { modify = true; msg += "Take profit: " + PriceToString(OldOrders[i].takeprofit,digit) + " -> " + PriceToString(OrderTakeProfit(),digit)+ "\n"; } if(Include_Balance) msg += "Balance: " + DoubleToString(AccountBalance(),1)+"\n"; if(IncludeAccNumber) msg += "Account number: " + DoubleToString(AccountNumber(),0)+"\n"; if(IncludeAccName) msg += "Account name: " + AccountName()+"\n"; msg += "Move stop to B/Even"; if(modify) { SendAlert(msg); if(SendScreenshot) for(int j=0; j<ArraySize(timeframe); j++) { SendScreenShot(symbol,OrderTicket(),timeframe[j]); Sleep(200); } } } }
Here is the result
Try this :
string x_emoji_for_text="\x274C"; string msg = "Order modified: "+x_emoji_for_text+" \n";
You were not adding the emoji code in the msg string
(for message text that is not markup , use emoji for text \xCODE formatAmazing thank you does the string matter? I assume it doesnt... so just need to make a list and add them all in
You can just add them in , or , you can define them on the beggining for accessing them easier
example :
//list of emojis #define EMOJI_SMILE "\x274C" #define EMOJI_POP_CORN "\x1F37F" ...define your emojis here //usage , you only need to type the emoji type you defined earlier string msg=EMOJI_SMILE+" Order Opened :\n";The definition list can be on top of the program set once, it does not need to be on the functions that use it
Hello .
Here is an example of 2 emojis for 2 separate uses for telegram . the x emoji and the check mark emoji .
You refer to a list of codes for emojis here .
In that list the code for check emoji is "U+2705" so for a button markup you turn it to \\u2705 and for text \x2705
Will only certain emojis works as I am trying money bag emoji and it doesn't work 1F4B0 it gives me
Ὃ0
Ticket: 928109117
Signal Result:
Symbol: USDCHF
Profit: 14.8 USD ( +0.7 pips )
Type: BUY
Open price: 0.96611
Closed at price: 0.96618
Ticket: 928109117
Time: 14:58
if i use another random emoji like 2733 it delivers the correct emoji?
✳
Ticket: 928109089
Signal Result:
Symbol: USDCHF
Profit: 19.0 USD ( +0.9 pips )
Type: BUY
Open price: 0.96610
Closed at price: 0.96619
Ticket: 928109089
Time: 14:57
Will only certain emojis works as I am trying money bag emoji and it doesn't work 1F4B0 it gives me
Ὃ0
Ticket: 928109117
Signal Result:
Symbol: USDCHF
Profit: 14.8 USD ( +0.7 pips )
Type: BUY
Open price: 0.96611
Closed at price: 0.96618
Ticket: 928109117
Time: 14:58
if i use another random emoji like 2733 it delivers the correct emoji?
✳
Ticket: 928109089
Signal Result:
Symbol: USDCHF
Profit: 19.0 USD ( +0.9 pips )
Type: BUY
Open price: 0.96610
Closed at price: 0.96619
Ticket: 928109089
Time: 14:57
The \x1F4B0 ?
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
How do I add emojis to my telegram messages?
Below is the code but it does not print the emoji when a message is sent.