Download MetaTrader 5
To add comments, please log in or register
Download MQL5 library codes via MetaTrader. It is convenient!
Gary Niemand
3876
Gary Niemand 2016.02.04 07:07 
Hi,
I have a question regarding the time discrepancies between output on the log and times on the transaction history.
 
2016.02.04 00:02:16.750    Trades    '680467': order #47966509 buy 0.01 / 0.01 AUDCAD at 0.98767 done in 246 ms
2016.02.04 00:02:16.747    Trades    '680467': deal #39021669 buy 0.01 AUDCAD at 0.98767 done (based on order #47966509)
2016.02.04 00:02:16.517    Trades    '680467': market buy 0.01 AUDCAD


The output from my EA(MT5) also corresponds to the above times, yet if I look on my statement....

 
order
2016.02.03 23:02 47966509 buy 0.01 / 0.01 AUDCAD market 0.00 0.00 2016.02.03 23:02 filled
 
 
deal
2016.02.03 23:02 39021669 buy 0.00 AUDCAD 0.98767 47966509
in 0.00 0.00 0.00 0.0

 

Any ideas/help would be appreciated.

Thanx

Gary

Alain Verleyen
Moderator
30298
Alain Verleyen 2016.02.04 08:56  
What are you talking about ? Which discrepancy ?
John Townsend
83
John Townsend 2016.02.04 09:18  

just a guess - are you looking at the broker's Server time for one part of each transaction & your local time for another part of that transaction?

GetLastError - MQL4 Documentation
GetLastError - MQL4 Documentation
  • docs.mql4.com
GetLastError - MQL4 Documentation - MQL4 Documentation
Gary Niemand
3876
Gary Niemand 2016.02.04 10:10  
Alain Verleyen:
What are you talking about ? Which discrepancy ?

Hi,


the log shows

2016.02.04 00:02:16.747    Trades    '680467': deal #39021669 buy 0.01 AUDCAD at 0.98767 done (based on order #47966509)

and the order history shows

2016.02.03 23:02 47966509

If I want to make Time based decisions, would TimeCurrent() be sufficient?

That is the Server time??


Alain Verleyen
Moderator
30298
Alain Verleyen 2016.02.04 12:34  

2016.02.04 00:02:16.747    Trades    '680467': deal #39021669 buy 0.01 AUDCAD at 0.98767 done (based on order #47966509)

This is local time (your computer). And it comes from the Journal tab, you can't change it.

If you want custom messages, you will have to use an EA and Print() your own messages.

Gary Niemand
3876
Gary Niemand 2016.02.04 13:35  
Alain Verleyen:

This is local time (your computer). And it comes from the Journal tab, you can't change it.

If you want custom messages, you will have to use an EA and Print() your own messages.

I do have messages coming from my EA that come out on the Experts tab. These correspond to the Journal times.

When do the Daily Statistics, OPEN CLOSE HIGH LOW etc get rolled over to the new day? Is it at GMT Midnight or GMT +2 Midnight?

Alain Verleyen
Moderator
30298
Alain Verleyen 2016.02.04 16:12  
Gary Niemand:

I do have messages coming from my EA that come out on the Experts tab. These correspond to the Journal times.

When do the Daily Statistics, OPEN CLOSE HIGH LOW etc get rolled over to the new day? Is it at GMT Midnight or GMT +2 Midnight?

The Experts tab automatic date is also the local time.

If you want custom messages, you will have to use an EA and Print() your own messages.

That means, the date/time also.
Gary Niemand
3876
Gary Niemand 2016.02.05 10:33  
Alain Verleyen:

The Experts tab automatic date is also the local time.

That means, the date/time also.

Hi,

I am currently doing that.

Does TimeCurrent() give the tradeserver time?

Could I use that to determine when the daily stats get rolled over, eg. OPEN CLOSE etc.


Alain Verleyen
Moderator
30298
Alain Verleyen 2016.02.05 12:42  
Gary Niemand:

Hi,

I am currently doing that.

Does TimeCurrent() give the tradeserver time?

Could I use that to determine when the daily stats get rolled over, eg. OPEN CLOSE etc.


Yes and yes.
Gary Niemand
3876
Gary Niemand 2016.02.05 12:52  
Alain Verleyen:
Yes and yes.

Thanx!

/
To add comments, please log in or register