jyett,

Is above me - maths side. But look at this thread which may well benifit you Help to calculate the slope of a line that is Perpendicular to a known line

Also phy gives good coverage in this thread Angled Trendlines

How to get the angle of a moving average?

Longshot maybe Elementary Linear Algebra; Solutions to Elementary Linear Algebra

afaik, __Tovan__ has posted somewhere... (man! I cannot find it now) with link to good maths site). Will look some more but I definitely remember him doing this...

good luck

.

more:

I am trying to calculate the angle from a previous bars High/Low to the open of the next bar. Does this code look right?

double getAngleByType(int orderType) {

double changeInY;

double changeInX = 60;

int buyNormalizer = 90;

if (orderType == OP_BUY)

{

changeInY = MathAbs(Low[1] - Open[0]);

}

else if (orderType == OP_SELL)

{

changeInY = MathAbs(High[1] - Open[0]);

buyNormalizer = 0;

}

return (MathAbs( //MathArctan(

buyNormalizer - (MathTan(

changeInY / changeInX)) * (180 / 3.14159) * angleMultiplier));

It seems to me that visually the angle calculated isn't what I was expecting.

Thanks