MQL4 - automated forex trading   /  

Documentation

MQL4 Reference  Math & Trig  MathSqrt

 
Use the opportunities of
MQL5 in MetaTrader 5
Study the new MQL5 language
Study the new MQL5 language.
Reference is already available
double MathSqrt( double x)
The MathSqrt function returns the square root of x. If x is negative, MathSqrt returns an indefinite (same as a quiet NaN).
Parameters:
x   -   Positive numeric value.
Sample:
  double question=45.35, answer;
  answer=MathSqrt(question);
  if(question<0)
    Print("Error: MathSqrt returns ",answer," answer");
  else
    Print("The square root of ",question," is ", answer);
  //Output: The square root of 45.35 is 6.73