在图表上输出多行的Comment(注释)

2019-01-30

externint MaxCommentsToShow=25;
//An array to hold all of the comments
string allcomments[];
 
//+------------------------------------------------------------------+
//| Manage comments - Written by DMS                                           |
//+------------------------------------------------------------------+
void managecomments(string addcomment)
   {
   string tempcomments[];
   int commentscroll;
   string output;
   int CommentCount = ArrayRange(allcomments,0);
   if(CommentCount<MaxCommentsToShow)
      {
      ArrayResize(tempcomments,CommentCount+1);
      ArrayCopy(tempcomments,allcomments,1,0,WHOLE_ARRAY);
      }
   else
      {
      ArrayResize(tempcomments,MaxCommentsToShow);
      ArrayCopy(tempcomments,allcomments,1,0,MaxCommentsToShow-1);
      }   
   tempcomments[0]=addcomment;
   CommentCount = ArrayRange(tempcomments,0);
   ArrayResize(allcomments,CommentCount);
   ArrayCopy(allcomments,tempcomments,0,0,CommentCount);
 
   for(commentscroll=0;commentscroll<CommentCount;commentscroll++)
      {
      output = output + allcomments[commentscroll]+"\n";
      }    
   Comment(output);
   }  

本博客所有文章如无特别注明均为原创。作者:天泓评测
分享到:更多

相关推荐

发表评论

路人甲 表情
Ctrl+Enter快速提交

网友评论(75)

I'd like to find out more? I'd like to find out some additional information.
KG 2周前 (2020-09-09) 回复
Hurrah! In the end I got a weblog from where I be able to genuinely obtain helpful
facts concerning my study and knowledge.
QC 2周前 (2020-09-09) 回复
I'd like to thank you for the efforts you have put in penning this site.
I'm hoping to view the same high-grade content from you later on as well.
In fact, your creative writing abilities has inspired me to get
my own, personal website now ;)
AS 3周前 (2020-08-30) 回复
Wow thɑt was strange. I just wrote an ᴠery ling comment but after I clicked submit
my commеnt diɗn't show ᥙp. Grrrr... well I'mnot writing all that
overr аgain. Ꭺnyhow, juѕt wanted tο ѕay excellent blog!
WO 3周前 (2020-08-30) 回复
I love your blog.. very nice colors & theme. Did you create this website yourself or
did you hire someone to do it for you? Plz answer back as I'm looking to design my own blog and would like
to find out where u got this from. appreciate it -ochbtlyj17
IP 4周前 (2020-08-26) 回复
Today, I went to the beach with my children. I found a sea shell and
gave it to my 4 year old daughter and said "You can hear the ocean if you put this to your ear."
She placed the shell to her ear and screamed. There was a
hermit crab inside and it pinched her ear. She never wants to go
back! LoL I know this is totally off topic but I had to tell someone!
WJ 1个月前 (2020-08-19) 回复
Thank you for the auspicious writeup. It in reality was once a entertainment account it.
Glance advanced to far added agreeable from you!
However, how could we keep in touch? -sbbc02
PV 1个月前 (2020-08-19) 回复
Hi there everyone, it's my first pay a quick visit at this web page, and paragraph is in fact fruitful in support of me, keep
up posting these types of articles.
UK 1个月前 (2020-08-17) 回复
You can definitely see your skills in the article you write.

The arena hopes for more passionate writers such as you who aren't afraid to mention how
they believe. Always follow your heart.
VJ 1个月前 (2020-08-16) 回复
I pay a quick visit each day some web pages and sites to read articles or reviews, but this webpage offers feature based writing.
CW 1个月前 (2020-08-16) 回复
1 2 3 4 5 6 ... »