MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal

Automated Trading Language Documentation

Subscribe to signal
Data Fx Average
25.59%, 125 590.41 EUR
How to Buy a Trading Robot on MQL5 Market? How to Buy a Trading Robot on MQL5 Market? Universal digital filter Indicator
Universal digital filter
Author: GODZILLA
CountDownCountDown Try product
CountDown
Author: song_song
Screenshot
مثقال‌طلا, M5
Demo
MQL5 ReferenceDate and Time 

Date and Time

This is the group of functions for working with data of datetime type (an integer that represents the number of seconds elapsed from 0 hours of January 1, 1970).

To arrange high-resolution counters and timers, use the GetTickCount() function, which produces values in milliseconds.

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


Updated: 2011.09.01