I'm trying to write an indicator to figure certain "angles" of lines. I figure if I can draw a line from point "A" to point "B" I should be able to determine the angle (in degrees) from that...unfortunately math/trig isn't my strongpoint.
I've got the following coded and it compiles just fine, but I'm not getting proper output...any input greatly appreciated.
DrawLine("tag1", true, 1, SLOPEREG[1], 0, SLOPEREG[0], Color.LimeGreen, DashStyle.Dot, 2);
CALC = ((SLOPEREG[0] - SLOPEREG[1]) / (CurrentBar - (CurrentBar - 1)));
LANGLE = System.Math.Atan(CALC) * 180 / Math.PI;
Comment