Download MetaTrader 5

TimeLocal TimeCurrent

To add comments, please log in or register
Your conversation partner speaks foreign language? Automatic translation will help you!
Pier Gaetano Novara
254
Pier Gaetano Novara 2016.07.08 16:51 

why functions TimeLocal & TimeCurrent always give me this date 16.07.07 23:59:59 ?

Who know how to get the PC system date & time?


Marco vd Heijden
Moderator
4707
Marco vd Heijden 2016.07.08 16:52  
Pier Gaetano Novara:

why functions TimeLocal & TimeCurrent always give me this date 16.07.07 23:59:59 ?

Who know how to get the PC system date & time?



Function


Action

TimeCurrent

Returns the last known server time (time of the last quote receipt) in the datetime format

TimeTradeServer

Returns the current calculation time of the trade server

TimeLocal

Returns the local computer time in datetime format

TimeGMT

Returns GMT in datetime format with the Daylight Saving Time by local time of the computer, where the client terminal is running

TimeDaylightSavings

Returns the sign of Daylight Saving Time switch

TimeGMTOffset

Returns the current difference between GMT time and the local computer time in seconds, taking into account DST switch

TimeToStruct

Converts a datetime value into a variable of MqlDateTime structure type

StructToTime

Converts a variable of MqlDateTime structure type into a datetime value

Pier Gaetano Novara
254
Pier Gaetano Novara 2016.07.08 17:12  
Marco vd Heijden:

Function


Action

TimeCurrent

Returns the last known server time (time of the last quote receipt) in the datetime format

TimeTradeServer

Returns the current calculation time of the trade server

TimeLocal

Returns the local computer time in datetime format

TimeGMT

Returns GMT in datetime format with the Daylight Saving Time by local time of the computer, where the client terminal is running

TimeDaylightSavings

Returns the sign of Daylight Saving Time switch

TimeGMTOffset

Returns the current difference between GMT time and the local computer time in seconds, taking into account DST switch

TimeToStruct

Converts a datetime value into a variable of MqlDateTime structure type

StructToTime

Converts a variable of MqlDateTime structure type into a datetime value

the problem is that inside OnTester()  I get only this value 16.07.07 23:59:59 for both, it seems that the StrategyTester use data & time of day before midnight
Marco vd Heijden
Moderator
4707
Marco vd Heijden 2016.07.08 17:32  

During testing in the strategy tester, TimeCurrent() is simulated.

To add comments, please log in or register