MQL4 Reference Common Functions PeriodSeconds

MQL4 Help as One File:

PeriodSeconds

This function returns number of seconds in a period.

int  PeriodSeconds(
   ENUM_TIMEFRAMES  period=PERIOD_CURRENT      // chart period
   );

Parameters

period=PERIOD_CURRENT

[in]  Value of a chart period from the enumeration ENUM_TIMEFRAMES. If the parameter isn't specified, it returns the number of seconds of the current chart period, at which the program runs.

Return Value

Number of seconds in a selected period.

See also

_Period, Chart timeframes, Date and Time, Visibility of objects