OrderCloseTime

Returns close time of the currently selected order.

datetime OrderCloseTime();

Returned value

Close time for the currently selected order. If order close time is not 0, then the order selected and has been closed and retrieved from the account history. Open and pending orders close time is equal to 0.

if(OrderSelect(10,SELECT_BY_POS,MODE_HISTORY)==true) {datetime ctm=OrderOpenTime();if(ctm>0) Print("Open time for the order 10 ", ctm); ctm=OrderCloseTime();if(ctm>0) Print("Close time for the order 10 ", ctm); }elsePrint("OrderSelect failed error code is",GetLastError());