Type comment on chart between several ; if condition for each of them in Separate Available then type that comment

 

hi;

i want to TYPE COMMENT ON CHART BETWEEN SEVERAL ;

if condition for each of them in Separate Available then type that comment .

i mean: ( FOR EXAMPLE )

Comment(
       if(a==1.0)  "\n a=1.0"
       if(b==1.0)  "\n b=1.0"
        if(c==1.0)  "\n c=1.0"
        .
        .
        .
      );

and on chart maby type :

a=1.0
b=1.0

or

b=1.0
c=1.0

or

a=1.0
c=1.0

or

.

.

.

is there a way for this ?

 

string text="";
 if(a==1.0)
   text="a=1.0";
 if(b==1.0)
   text="b=1.0";
 if(c==1.0)
   text="c=1.0";
Comment(text);

 
kourosh1347:

OK thank you;

but only the last set is will be type. isn't ?

i will check it.

thank for your answer.

 
TIMisthebest:

OK thank you;

but only the last set is will be type. isn't ?

i will check it.

thank for your answer.

You would do something like this . . .

string text="";
 if(a==1.0)
   text = "a=1.0\n";

 if(b==1.0)
   text = text+"b=1.0\n";

 if(c==1.0)
   text = text+"c=1.0\n";

Comment(text);

 

 

If you want to show all the text . you can use below code
string text="";
 if(a==1.0)
   text="\n a=1.0";
 if(b==1.0)
  StringConcatenate( text,"\n b=1.0");
 if(c==1.0)
   StringConcatenate( text,"\n c=1.0");
Comment(text);

 
RaptorUK:

You would do something like this . . .

that's it

thank you.

 
thank you all
Reason: