在图表上输出多行的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);
   }  


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

相关推荐

网友评论(73)

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 1年前 (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 1年前 (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 1年前 (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) 回复
Do you have a spam issue on this site; I also am a blogger,
and I was curious about your situation; many of us have developed some nice procedures
and we are looking to trade strategies with other folks, why not shoot me an e-mail if interested.
BM 1年前 (2020-08-16) 回复
Very nice post sir really good website
Play bazaar 1年前 (2020-08-15) 回复
1 2 3 4 5 6 ... »