time in the terminal at the championships - page 6

 

Yedelkin:


But in doing so, I would have to accept three types of risk:

- the risk that the quotes would in fact arrive at a time which does not correspond to GMT+1 timezone;

- the risk that the time indicated with the quotes would not actually support Daylight Saving Time;

- the risk that the switch back to winter time will not be implemented for a quote time other than October 28.


This is exactly what I am talking about!

All right, this discussion seems to have reached its conclusion as the Organiser's main response is that it will be GMT+2 until 28th October 2012 and GMT+1 after 28th October.

The question of historical data is no longer of interest to me, as I simply took these changes into account in the EA.

 

Tried to use functions on historical data to determine the time:

Print("GMT=",TimeGMT());
Print("Current=",TimeCurrent());
Print("Ofset=",TimeGMTOffset());
Print("Local=",TimeLocal());

All show the same time = TimeCurrent(); Ofset=0;

Can you tell me, maybe I'm doing something wrong?

If I'm doing everything right, then how can I use these functions when testing?

 
autoforex:

Tried to use functions on historical data to determine the time:

All show the same time = TimeCurrent(); Ofset=0;

Can you tell me if I'm doing something wrong?

Yes, that's right. See "Fundamentals of Testing in MetaTrader 5", section "Simulating Time in the Tester". All show the same time = TimeGMT().
 
autoforex If I'm doing everything right, then how can I use these functions when testing?
This is just a reason to keep repeating the same advice: in trading oriented to certain timezones, it is advisable to start with TimeGMT(). In this way, you will reach that "universality", which was mentioned yesterday :)
 

dear Roche... I don't understand why it is so difficult to answer whether there will be a switch to winter time on October 28?

not everyone here is a super programmer who can do nuclear fusion by means of µl!!!! (most of the language is on the other side of the screen).

this is the forum for asking!!!!!!!!!!! (w.m.)

 
Yedelkin:

but how do I make an amendment?

MqlDateTime time;
TimeGMT(time);
//Плюс поправка на летнее время, если торговая деятельность завязана на таймзону с наличием летнего времени
 
Yedelkin:
Yes, that's correct. See article"Basics of testing in MetaTrader 5", section "Simulation of time in the tester". All show the same time = TimeGMT().

Yes, thank you, I saw that. That's pretty much it.

 
Yedelkin:
This is just a reason to keep repeating the same advice: in trading oriented to certain timezones, you should use TimeGMT(). In this way you will get that "universality", which was mentioned yesterday :)

In trading, yes, but in testing?

How do I know if daylight saving time has been changed in testing? It turns out you can't?????

 
autoforex:

In trading, yes, but in testing?

How do I know if daylight saving time has been changed in testing? It turns out that there is no way?????

And in testing - too. Judge for yourself. If we start from GMT, we have to assume that this timezone remains unchanged throughout the year. After all, all other timezones, if they have daylight saving time, add one hour to GMT. This means that in the GMT tactical orientation you must monitor if the desired timezone is in summer/winter time. I.e., the code must already contain checks for the occurrence/end of daylight saving time in the desired timezone. These checks will work in the tester.

Of course, this is true if the quotes in the history are stored with GMT-times, but this question hasn't even arisen yet :/

 
maryan.dirtyn:

but how do I make an amendment?

Check the condition: "at the next quote thecurrent time in GMT is greater than the date you need (28.10.12)". If condition is fulfilled, then further testing of trade conditions should be done considering the necessary timezone in a winter time (for example, GMT+1), if condition is not fulfilled - considering a summer time (in continuation of example, GMT+2). Like this.
Документация по MQL5: Дата и время / TimeCurrent
Документация по MQL5: Дата и время / TimeCurrent
  • www.mql5.com
Дата и время / TimeCurrent - Документация по MQL5