Date of an opened order

 

Yo,

juste a simple question, how to know the opening date of a selected order ?

I mean I got 5 orders open and still not clotured, and I want to know the date when my EA opened a selected order...


Thanks in advance

 
Use OrderOpenTime().  Remember to first select the order using OrderSelect().
 

ah it returns the time of my order...

Thought it returns how long the order was open...


what does it return exactly ?

 
Bad_Bond:

ah it returns the time of my order...

Thought it returns how long the order was open...


what does it return exactly ?

If you click this link  OrderOpenTime()   you can read the documentation and discover what is returned.
 
but i read this but i understand on wrong way
 
Bad_Bond:
but i read this but i understand on wrong way

OK,  lets see if I can help explain.

The value that is returned is a    datetime type    and represents the date and time when the currently selected Order was opened. To use OrderOpenTime() you must first select the correct Order that you want to Open time for.  Does that help ?

 
first select the correct Order that you want to Open time for.
string DateToKnow =TimeToStr(OrderOpenTime() ,TIME_DATE);