Angle of 2 candles

 

How do I get the angle of 2 candles


as in


price1=iClose(Symbol(),0,2);

price2=iClose(Symbol(),0,1);


Now, I need tofind the angle of the line made by the 2 prices.


How do I achieve this.

 

JL

You know the components of the angle already

double slope1 = (price1-price2)/NormalizeDouble(NumberOfBars, 1);

The angle in mils or degrees is a bit academic, as you can always compare your slope values?

FWIW

-BB-