//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
double Angle()
{
datetime time0,time1;
double Price0,Price1;
int x0, x1, y0, y1;
time0=datetime(ObjectGetInteger(0,"mid",OBJPROP_TIME,0));
time1=datetime(ObjectGetInteger(0,"mid",OBJPROP_TIME,1));
Price0=ObjectGetDouble(0,"mid",OBJPROP_PRICE,0);
Price1=ObjectGetDouble(0,"mid",OBJPROP_PRICE,1);
ChartTimePriceToXY(0,0,time0,Price0,x0,y0);
ChartTimePriceToXY(0,0,time1,Price1,x1,y1);
double angle=atan(double(y0-y1)/double(x1-x0))*180/3.142;
return(angle);
}
verta81