Why can not separate text lines in Telegram?

Why can not separate text lines in Telegram?

Manage alerts

Loading saved threads...

Alvin Sanusi · External communityPost link
External question — Stack Overflow Stack Exchange Author: Alvin Sanusi Original post: https://stackoverflow.com/questions/71054106 License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/ Adaptation: HTML converted to plain text; contact email addresses removed. I created an EA in MQL4 where I send a text to be displayed as 3 lines of text in Telegram where each line is ended with \n as follows: message = "Line one\n" + "Line two\n" + "Line three"; But somehow, the message are shown in Telegram as 1 single line, concatenating all the 3 lines. I think \n is not recognized by Telegram. I am not sure what kind of characters should be used to create a line break. Can anyone provide some help for me on how to separate each lines so it is shown neatly in Telegram message? Thank you. Alvin
Quote
Report
PaulB · External communityPost link
External answer — Stack Overflow Stack Exchange Author: PaulB Original post: https://stackoverflow.com/a/71062850 License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/ Adaptation: HTML converted to plain text; contact email addresses removed. Try adding \r\n to your text instead of just \n .
Quote
Report
sanoek · External communityPost link
External answer — Stack Overflow Stack Exchange Author: sanoek Original post: https://stackoverflow.com/a/76583722 License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/ Adaptation: HTML converted to plain text; contact email addresses removed. string limit = "78.65"; string tp = "80.45"; string sl = "71.23"; string msg = StringFormat("BRN SELL|LIMIT: %s|TP: %s|SL: %s", limit, tp, sl); StringReplace(msg,"|", "%0A"); That's how I do it in MQL5.
Quote
Report

Post Reply

Quoted from Forex.com.bd-Editorial External answer — Stack Overflow Stack Exchange Author: sanoek Source score (net votes, not local likes): 0 Original post: https://stackoverflow.com/a/76583722 License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/ Adaptation: HTML converted to plain text; contact email addresses removed. string limit = "78.65"; string tp = "80.45"; string sl = "71.23"; string msg = StringFormat("BRN SELL|LIMIT: %s|TP: %s|SL: %s", limit, tp, sl); StringReplace(msg,"|", "%0A"); That's how I do it in MQL5.

Cancel quote

Checking account access…