Questions from Beginners MQL4 MT4 MetaTrader 4 - page 243

 
AS_SS:

Is it incorrect in the book by Seergei Kovalev ?

I can't say anything about this author, but if you look in the help you'll see that the function takes and gives double, so that's how you should declare the variables:

double  MathSqrt(
   double  value      // положительное число
   );
 
transcendreamer:

I can't say anything about this author, but if you look in the help you'll see that the function takes and gives double, so that's how you should declare the variables:

Yes, there's no error. But why is there no output on the screen? I think we should see the number 5 on the screen?

 
AS_SS:

Yes, there is no error. But why is the number 5 not displayed on the screen afterwards?

It's supposed to be on the screen.

 
transcendreamer:

It should output...

and not put on the EA chart...

 
AS_SS:

and the EA is not put on the chart...

was the compilation successful?

 
transcendreamer:

was the compilation successful?

Yes

 
AS_SS:

Yes

Yes

Files:
 
AS_SS:

Yes

I don't know what you've done wrong, here you go:

Files:
 
transcendreamer:

I don't know what did something wrong, here you go:

Thanks for your time. Maybe you can recommend me where to start learning how to program in MQL4. Maybe some literature?

 
AS_SS:

Thank you for your time. Maybe you can recommend me where to start learning how to program in MQL4. Literature, maybe?

You're welcome... You can start with the event model, get to know the functions OnTick OnInit OnCalculate OnDeinit, then move on to the data, buffers Close, Time, and so on, then to the trading functions and then, as required, you become an international expert.

Reason: