General Topics
Technical Topics
Brokerage Firms
Community Lounge
Site Support

# Maths wizz only thanks

Discussion in 'Chit Chat' started by Digs, Apr 6, 2010.

1. ### Digs

HI,

I have the angle in degrees ( like 22,45,67,75), I also have the length of 100 for the bottom black line.

How do I calculate the LENGTH of X (ie dotted red line)

I forgotten SIN, COS, TAN..

File size:
8.4 KB
Views:
424
2. ### garchbrooks

Remember the rhyme about the indian princess named soh-cah-toa.

sin = opposite over hypotenuse (sin->soh)
cah = adjacent over hypotenuse (cos->cah)
toa = oppositive over adjacent (tan->toa)

Calculators do it in radians and not degrees, usually; make sure you convert from rad to deg, or deg to rad for the values.

4. ### danthoma

Tan(67) = X/100

100 * Tan(67) = X

6. ### Digs

Writing code for a super dooper angle thingy me gig

7. ### Digs

Ok its NOT working..

Tan(67) = X/100

100 * Tan(67) = X

I assume I convert the 67 to redians like

Angle = 67 / 180 * Math.PI

8. ### Gabfly1

Is it by any chance chart related? As in the angle of price action? (I hope not.)

9. ### Digs

NOPE pixels, but it is on chart, I converted to pixels

100 is pixels

10. ### danthoma

Why convert to radians? Just make sure whatever you are using to calculate the tangent is in degrees. Either way it will be the same answer. It would be (67 * Pi) / 180 if you are trying to convert to radians.

http://mathworld.wolfram.com/Tangent.html

#10     Apr 6, 2010
ET IS FREE BECAUSE OF THE FINANCIAL SUPPORT FROM THESE COMPANIES: