Download MetaTrader 5

Question about "Comment" to Filter...

To add comments, please log in or register
All Code Base apps are available from MetaTrader 5. You can publish your own one!
Vantages 2015.02.13 00:57 


I was surprise to see how "Comment" was written

to my question yesterday about YTD% & Points changed.

May I ask if (1) "Comment" line would replace my

"DrawLabels" or "DrawInfos" at the right side of my 

chart which consists 30 lines (2) how can I make it to

more than one line - horizontally (3) would this reduce

or speed up the memory of CPU (VPS) ?


Stuart Browne
Stuart Browne 2015.02.13 03:46  

Hi Vantages

I just used the Comment line as a quick way to show you how to get the formula working. You can certainly change it into text or label objects if you want. Although I've never tested it  I would say that using Comments would be less CPU intensive but I would guess it would be negligible.

If you want to continue using the Comments function but have it on multiple lines then all you need to do is include the new line escape "\n" when you want to break a line. So this:

Comment  ("Points: ", YTDPoints, " Percent: ", YTDPercent, "%");

...could be changed into something like this to split it across 2 lines (notice the "\n" before "Percent") :

Comment  ("Points: ", YTDPoints, "\nPercent: ", YTDPercent, "%");

Hope that answers your questions mate.


p.s. next time, probably better to keep any new questions about the same topic in the original thread. Helps others follow it if they are having similar questions :)

Vantages 2015.02.13 04:28  


Gladly appreciate all your response.

Will do my part to further study it.

Thanks a lot ! 

To add comments, please log in or register