i cant seem to multiple.

 
                             string tpNumber = ObjectGetString(_Symbol, "TPEDIT", OBJPROP_TEXT);
			   
			     double p  = NormalizeDouble(SymbolInfoDouble(_Symbol, SYMBOL_ASK), _Digits);

                              double tp = p + (tpNumber * _Point);

               
                              trade.PositionModify(ticket, gettingSlFromTrade , tp);

 every time i run the above code i get an error in the inidcated line saying " '*' illegal operation used ". any help in rectifing this?


 
yomadestephens: any help in rectifing this?


What is tpNumber?
     How To Ask Questions The Smart Way. (2004)
          Be precise and informative about your problem

 
William Roeder #:

What is tpNumber?
     How To Ask Questions The Smart Way. (2004)
          Be precise and informative about your problem

i have edited my question now.

 

Well, you cannot multiply strings.

Try

double tp = p + (StrToDouble(tpNumber) * _Point);

if you're sure the string is guaranteed to contain a representation of a number; you might however want to convert and check it beforehand.

 
Haruto Rat #:

Well, you cannot multiply strings.

Try

if you're sure the string is guaranteed to contain a representation of a number; you might however want to convert and check it beforehand.

thanks for the response. i got it rectified by your first line of reponse.