How to write a new line in Comment()

 
How to write a new line in Comment()
MQL4 question
thanks
 

Kelly, embed literals into your "..." string. See https://docs.mql4.com/basis/types/literal

and https://docs.mql4.com/basis/types/string

viz: "Line.1\nLine.2\nLine.3"

btw, your MetaEditor has the MQL4 language help built in. You can also use Control-D followed by 'search' tab to search editors help...

 
fbj:

Kelly, embed literals into your "..." string. See https://docs.mql4.com/basis/types/literal

and https://docs.mql4.com/basis/types/string

viz: "Line.1\nLine.2\nLine.3"

btw, your MetaEditor has the MQL4 language help built in. You can also use Control-D followed by 'search' tab to search editors help...

it helps me

thanks for fbj

 
LEE Chun Wing:
How to write a new line in Comment()
MQL4 question
thanks

Check out CommentXY in this post:

https://www.mql5.com/en/forum/263564#comment_8035537

 
LEE Chun Wing:
How to write a new line in Comment()
MQL4 question
thanks

Add "\n" for each new line break that you want to insert

Ie:

Comment("first line\n"+
        "second line\n"+
        "third line\n"+
        "...\n"+
        "nth line");
Reason: