filson:
Tan-1( b/a ) => Tan-1(0.5/1) = 26.56 degrees (on ms calculator)Tanh( b/a ) => Tanh(0.5/1) = 0.46 (on ms calculator)
MathArctan( 0.5/1.0 ) = 0.46 in MT4
Where did you get that number. Using the MS calculator:
Tan(26.560 degrees) = 0.499889
Tan-1(.5)=26.565 degrees=0.463 radians
Tanh-1(0.5) = 0.5493
Is it because it is working in Radians ?
Yes.
From the documentation: https://docs.mql4.com/math/MathArctan
The MathArctan returns the arctangent of x. If x is 0, MathArctan returns 0. MathArctan returns a value within the range of -π/2 to π/2 radians.
WHRoeder youre almost right in following me.
Only that last line "Tanh-1(0.5) = 0.5493" isn't what i found MT to output.
You're right that Tanh-1(0.5) is 0.5493 but i'm not doing the inverse Tanh in MT4.
When you do an Arctan in MT4 you get the result that Tanh on the MS calculator would output.
And in essence i need the inverse tangent to figure out the angle between a and c.
filson:
You're right that Tanh-1(0.5) is 0.5493 but i'm not doing the inverse Tanh in MT4.
- There are NO Tanh functions in MT4 so how did you get the value that you're not doing?
- MathArctan( 0.5/1.0 ) = 0.46 in MT4Tan-1(.5)=26.565 degrees=0.463 radiansThe result in MT4 is CORRECT. Go to your calculator and press the radians button
Very interesting discussion and thanks for participating!
Thanks for highlighting that the MathArctan() is outputting radians.
Converting back to degrees solves it nicely.
Filson
Very interesting discussion and thanks for participating!
Thanks for highlighting that the MathArctan() is outputting radians.
Converting back to degrees solves it nicely.
Filson

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hey.
Ive been fiddling about with the trigonometric functions in MT4 and have come to a conclusion that the ArcSin, ArcCos and ArcTan functions are really outputting the hyperbole of the individual functions.
Is this true?
Here's how i use them and what i expect:
Right triangle a=1, b=0.5, c. Trying to locate the angle of ac.
Tan-1( b/a ) => Tan-1(0.5/1) = 26.56 degrees (on ms calculator)
Tanh( b/a ) => Tanh(0.5/1) = 0.46 (on ms calculator)
MathArctan( 0.5/1.0 ) = 0.46 in MT4
What i really need is just a inverse MathTan() equal to tan-1 on "regular" calculators.
Hope you can help out.
Filson