ใช้คำสั่งนี้ครับ OrderOpenTime()
ตัวอย่าง
//+------------------------------------------------------------------+
//| Expert initialization function |
//+------------------------------------------------------------------+
int OnInit()
{
OrderSend(Symbol(),OP_BUY,0.1,Ask,3,0,0,"Time",0,0,Green);
return(INIT_SUCCEEDED);
}
//+------------------------------------------------------------------+
//| Expert tick function |
//+------------------------------------------------------------------+
int start()
{
Print("Time=",OrderOpenTime());
return(0);
}
//+------------------------------------------------------------------+