How to write a new line in Comment()

To add comments, please log in or register
LEE Chun Wing
837
LEE Chun Wing  
How to write a new line in Comment()
MQL4 question
thanks
fbj
1048
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...

LEE Chun Wing
837
LEE Chun Wing  
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

Anthony Garot
3297
Anthony Garot  
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

Mladen Rakic
160519
Mladen Rakic  
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");
To add comments, please log in or register