time in the terminal at the championships - page 9

 
autoforex: A candlestick with the time 22.00 GMT+2 is received online. I.e., if we obtain in the real trade for this bar:

TimeCurrent()=22.00 TimeGMT()=20.00

Now, when we start the tester and output the time on the same candlestick, we get:TimeCurrent()=22.00 TimeGMT()=22.00

So it turns out, according to your calculations, the real candle came to us at 20.00 GMT+0 in the tester, it will pop up at 22.00 GMT+0. That is, in the tester, the candle will pop up two hours later than the real state of affairs. Right?
 
Yedelkin:
So it follows, according to your calculations, that the "candle came" in the real trading session at 20:00 GMT+0 and it will pop out in the tester at 22:00 GMT+0. Therefore, the candle will pop out in the tester 2 hours later than the real state of affairs. Is it correct?

No, it will pop up at 22:00 GMT+2.

The thing is that the candle came not at 20.00 GMT+0, but at 22.00 GMT+2 !!! This is the same point in time, but exactly the time 22.00 GMT +2 will be stored in the history along with the quote!

The point is that the tester doesn't have the concept of GMT time. There is only CurrentTime(), and this is not GMT, this is the server's time at the moment of a given quote! You will never get the GMT time from the tester!

Документация по MQL5: Дата и время / TimeGMT
Документация по MQL5: Дата и время / TimeGMT
  • www.mql5.com
Дата и время / TimeGMT - Документация по MQL5
 
stringo:

Why can't you monitor the time returned by TimeTradeServer compared to TimeGMT and catch the difference in calculations that comes out of nowhere?

So the existing functionality is not enough for you?

And what will TimeGMT return in the strategy tester?
 
Interesting:
What will TimeGMT return in the strategy tester?
It will return the time of the current candle = CurrentTime(). This is easy to check.
 

autoforex:

Now when we run the tester and on the same candle we get the time:

TimeCurrent()=22.00

TimeGMT()=22.00

No, the candle will pop up at 22.00 GMT+2.

Your conclusion is contrary to your own observations :) First, you observe that TimeCurrent()==22.00==TimeGMT(), but do not want to admit that it is TimeCurrent()==TimeGMT() in the tester. That is, you don't want to admit that the server time in the tester coincides with GMT.

Then you write that "the candlestick will pop up at 22.00 GMT+2", while half an hour earlier, you have written that "when we start the tester and wait for the time at the same candlestick, we will get: TimeGMT()=22.00". So, what time pops the candle, at 22.00 GMT +2 or 22.00 GMT +0? :) Not according to your logic, but according to a fact?

You will never know GMT time from a tester!

Yep, and at the same time you are calmly printing out the GMT time from the tester :) Otherwise how would you know it's 22.00?

The thing is, the tester has no concept of GMT time.

How do you get this information? What does the test article you read today tell you about?

 
Yedelkin:

Your conclusion contradicts your own observations :) First, you observe that TimeCurrent()==22.00==TimeGMT() in the tester, but stubbornly do not want to admit that TimeCurrent()==TimeGMT() in the tester. That is, you don't want to admit that the server time in the tester coincides with GMT.

Then you write that "the candlestick will pop up at 22.00 GMT+2", while half an hour earlier, you have written that "when we start the tester and wait for the time at the same candlestick, we will get: TimeGMT()=22.00". So, at what time the candlestick pops up, at 22.00 GMT+2 or at 22.00GMT+0? :) Not according to your logic, but according to a fact?

Yep, and at the same time you safely print GMT time from your tester :) Otherwise how would you know it's 22.00?

How would you know that? What does the test article you read today tell you?

Well, the tester doesn't calculate GMT correctly. It's not calculated at all, it's equated to CurrentTime()!
 
autoforex:
Well, the tester doesn't calculate GMT correctly. It is not calculated at all, but equated to CurrentTime()!

Great conclusion to back up your position :) - Tester's fault :)

So, what does the article you read today say?

So what time the candle pops, at 22.00 GMT+2 or 22.00 GMT+0? Suppose the tester does not calculate the time correctly - it produces at least some "wrong" values.

 
Yedelkin:

Great conclusion to back up your position :) - Tester's fault :)

So, what does the article you read today say?

And you didn't answer this question: at what time does the candle pop up, at 22.00 GMT+2 or 22.00 GMT+0? That is, not according to your logic, but according to a fact?

You probably stubbornly want me to come to certain conclusions on my own. If I'm wrong, you'd better say so directly, because I'm convinced that I'm right and I may not come to the right conclusions.

The point is that the TimeGMT() function gives out GMT, which is calculated with daylight saving time from the local computer time.

I didn't read the article, not interested. The candlestick pops up at 22.00 GMT+2 in the tester logs.

Документация по MQL5: Дата и время / TimeGMT
Документация по MQL5: Дата и время / TimeGMT
  • www.mql5.com
Дата и время / TimeGMT - Документация по MQL5
 
autoforex: I haven't read the article, not interested.
Well, that's the end of it, then.
 
Yedelkin:
Well, that's the end of it then.

Here's an excerpt from an article that touches on time (per your advice):

Time modelling in the tester

During testing, the local time TimeLocal() is always equal to the server time TimeTradeServer(). The server time, in its turn, is always equal to the time corresponding to GMT time - TimeGMT(). Thus, all these functions produce the same time when tested.

The reason why there is no difference between GMT, local and server time in the tester is because there might not always be communication with the server. We want the test results to be consistent regardless of the connectivity. Server time information is not stored locally but is taken from the server.

From this it is only correct that the time is the same in the tester. But that does not mean that this time is equal to GMT. According to my observations it is equal to the server time of the quotation, i.e. SET (for the quotation server). You asked a question about this at the end of the article. I question the correctness or completeness of the answer given there.

Reason: