How can I send a comment to the chart on the line below, my comments are overwriting and only appearing on the same line at the top of the chart?
For the next line you could use "\n" . Maybe this example could help you :
secondlineCOMMENT = "\nthis is secone line";
thirdlineCOMMENT = "\nthis is third line";
Comment(firstlineCOMMENT,secondlineCOMMENT,thirdlineCOMMENT);Hope this help
For the next line you could use "\n" . Maybe this example could help you :
secondlineCOMMENT = "\nthis is secone line";
thirdlineCOMMENT = "\nthis is third line";
Comment(firstlineCOMMENT,secondlineCOMMENT,thirdlineCOMMENT);Thanks Dave, yes it puts it on the next line, but for some reason I only have one line at a time displaying, I want to have
firstcomment("some info", stuff)
then on the next line on the chart
secondcomment(("some more info", stuff1)
so it appears on the chart like this
some info 204
some more info 210
I only get the last line each time
Thanks a lot for your help
Looking at some other code, I see what you mean about putting \n in the comment line as in
Comment("\nYesterday quotations:\nH ",yesterday_high,"\nL ",yesterday_low, "\nC ",yesterday_close);
but I wanted to print a comment from 2 different lines in the code, like this
if (somecode=othercode){
Comment("Yesterday quotations");}
if (anothercode=yetanother){
Comment("\nTodays quotations");}
With this all I get is the second comment
Todays quotations
not 2 lines
Another trick that I use is don't print the comment right away, just set a variable for each line comment. After the checking routine is done, then print all comment variable.
Example :
if (somecode=othercode){
Comment1 = "Yesterday quotations";}
if (anothercode=yetanother){
Comment2 = "\nTodays quotations";}
Comment(Comment1,Comment2);
Maybe other programmer got other solution. Hope this help
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
How can I send a comment to the chart on the line below, my comments are overwriting and only appearing on the same line at the top of the chart?