//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
datetime Last(int type)
{
datetime t=0;
for(int i=ObjectsTotal(0,0,-1)-1; i>=0; i--)
{
if(type==0 && ObjectGetInteger(0,ObjectName(0,i,0,-1),OBJPROP_TYPE)==OBJ_ARROW && ObjectGetInteger(0,ObjectName(0,i,0,-1),OBJPROP_ARROWCODE)==221)
{
t=datetime(ObjectGetInteger(0,ObjectName(0,i,0,-1),OBJPROP_TIME));
break;
}
if(type==1 && ObjectGetInteger(0,ObjectName(0,i,0,-1),OBJPROP_TYPE)==OBJ_ARROW && ObjectGetInteger(0,ObjectName(0,i,0,-1),OBJPROP_ARROWCODE)==222)
{
t=datetime(ObjectGetInteger(0,ObjectName(0,i,0,-1),OBJPROP_TIME));
break;
}
}
return(t);
}
//+------------------------------------------------------------------+
AM2