Download MetaTrader 5

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

To add comments, please log in or register
Mehrdad Shiri
4665
Mehrdad Shiri  

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 ?

Kourosh Davallou
49975
Kourosh Davallou  

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);

Mehrdad Shiri
4665
Mehrdad Shiri  
kourosh1347:

OK thank you;

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

i will check it.

thank for your answer.

Simon Gniadkowski
Moderator
18042
Simon Gniadkowski  
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);

 

Kourosh Davallou
49975
Kourosh Davallou  

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);

Mehrdad Shiri
4665
Mehrdad Shiri  
RaptorUK:

You would do something like this . . .

that's it

thank you.

Mehrdad Shiri
4665
Mehrdad Shiri  
thank you all
To add comments, please log in or register