how to convert long to string?

 

Hi
How can I convert long type value  to string?

I tried with IntegerTo String   and got same warning.
Also I checked this page but there is no LongToString or something with "Long" word.


 if(ObjectCreate(ChartID(),"rez",OBJ_TEXT,0,TimeCurrent(),Low[0]-0.0001))
     {

      ObjectSetString(ChartID(),"rez",OBJPROP_TEXT,Volume[2]);// the value of Volume[2] converts to string and works but editor gives warning.
      ObjectSet("rez",OBJPROP_ANGLE,90);
     }

 


Conversion Functions - MQL4 Reference
Conversion Functions - MQL4 Reference
  • docs.mql4.com
Conversion Functions - MQL4 Reference
 
Reza nasimi:

Hi
How can I convert long type value  to string?

I tried with IntegerTo String   and got same warning.
Also I checked this page but there is no LongToString or something with "Long" word.


hi Reza,

Did you try this :)

ObjectSetString(ChartID(),"rez",OBJPROP_TEXT,DoubleToString(Volume[2],0));
 
Yohana Parmi:

hi Reza,

Did you try this :)


Hi dear Yohana Parmi :)

Thank you very much .
It works without warning now .

 

its just simple typecasting using (string), you dont need no function.

string s = (string)longvalue;

 
Doerk Hilger:

its just simple typecasting using (string), you dont need no function.

string s = (string)longvalue;

Doerk Hilger:

its just simple typecasting using (string), you dont need no function.

string s = (string)longvalue;



Hi Doerk Hilger.
I saw your comment late but It was very helpful 

Thank you