- zero divide error in ea mql4
- Elite indicators :)
- Hi Guys. I am having 2 error codes on my code i am unable to fix.
Your code compiles just fine.
Note that the return of MathSqrt() is double and u r passing it to int so the result will be type-casted. In this case (since the result is 5.0) it makes no difference, but in other cases type-casting from double to int will result in the fractional part to be truncated.
In the future:
Your code compiles just fine.
Note that the return of MathSqrt() is double and u r passing it to int so the result will be type-casted. In this case (since the result is 5.0) it makes no difference, but in other cases type-casting from double to int will result in the fractional part to be truncated.
In the future:
Hey Gordon. Thanks for ur response really appreciate it. But still trying to compile this code and it gives me error that 'c' variable not defined. Dont know what i did wrong. Really sorry to bother you. Thanks
Hey Gordon. Thanks for ur response really appreciate it. But still trying to compile this code and it gives me error that 'c' variable not defined. Dont know what i did wrong. Really sorry to bother you. Thanks
Are us sure the code u r trying to compile is EXACTLY the same as in your attachment? The attachment compiles fine. There is no problem with the c variable.
Are us sure the code u r trying to compile is EXACTLY the same as in your attachment? The attachment compiles fine. There is no problem with the c variable.
Thanks gordon. The mistake i made is i dint put int c_2 = a*a + b*b in

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use