Why OrderOpenTime() returns wrong time?

 

Hi,

I'm getting wierd result using OrderOpenTime() function. When I place a OP_BUYLIMIT order, it's time (as shown in MT4 terminal) is correct (server time). BUT when it becomes a real BUY order, it's OrderOpenTime changes to about 1 hour later of the current server time!

Why could this happen? Please help, thanks a lot!

sea 

 
When pending orders becomes market orders, broker server will update the open time accordingly.
 

Well this situation i know... 

I mean, its value is about 1 hour AFTER the current time

 
seawan:

Well this situation i know... 

I mean, its value is about 1 hour AFTER the current time

TimeCurrent() ?  your PC time ? your Broker's time ?  was the order opened 60 mins ago ?
 

In WT4, the "Market Watch" tab gives the current time (I think it's broker's time).

When I place an pending order, and use OrderOpenTime() on this order, I get the same time value as TimeCurrent() and the above showed time.

When this order turns into real, it's  OrderOpenTime()  changes to another time value (which I can understand) but this value is beyond (after) the TimeCurrent() and the displayed time of the "Market Watch" tab!

(and I'm not saying anything about the time of my own computer...) 

 
seawan:

In WT4, the "Market Watch" tab gives the current time (I think it's broker's time).

When I place an pending order, and use OrderOpenTime() on this order, I get the same time value as TimeCurrent() and the above showed time.

When this order turns into real, it's  OrderOpenTime()  changes to another time value (which I can understand) but this value is beyond (after) the TimeCurrent() and the displayed time of the "Market Watch" tab!

(and I'm not saying anything about the time of my own computer...) 

Could it be that the NY-DST change last weekend has caused this difference?
 
gooly:
Could it be that the NY-DST change last weekend has caused this difference?
If so, it is a bug of the library function OrderOpenTime(), and could have caused some serious trouble on those relying on this function to look after their budget.
 
seawan:
If so, it is a bug of the library function OrderOpenTime(), and could have caused some serious trouble on those relying on this function to look after their budget.

The problem is you don't post the relevant information like the journal-tab, the broker time (incl. time zone) - this might have been changed as well due to DST.

But I am quite sure if you start investigating all that you'll find everything is ok.

 
seawan:

In WT4, the "Market Watch" tab gives the current time (I think it's broker's time).

When I place an pending order, and use OrderOpenTime() on this order, I get the same time value as TimeCurrent() and the above showed time.

When this order turns into real, it's  OrderOpenTime()  changes to another time value (which I can understand) but this value is beyond (after) the TimeCurrent() and the displayed time of the "Market Watch" tab!

(and I'm not saying anything about the time of my own computer...) 

Isn't that the time at which the Pending --->  an active Buy/Sell Order ?
 
RaptorUK:
Isn't that the time at which the Pending --->  an active Buy/Sell Order ?

Nope. You can see the strange time value on an order created only seconds ago.

And @gooly: when I use MQL functions, there is no place for me to submit those "relevant information"...just OrderPrint(), OrderOpenTime() etc.

 

And @gooly: when I use MQL functions, there is no place for me to submit those "relevant information"...just OrderPrint(), OrderOpenTime() etc.

With "post" I meant posting here the information from which we might be able to find the clue to your problem.

Reason: