Returns the current chart timeframe.


Return Value

The contents of the _Period variable that contains the value of the current chart timeframe. The value can be one of the values of the ENUM_TIMEFRAMES enumeration.


Unlike Expert Advisors, indicators and scripts, services are not bound to a specific chart. Therefore, Period() returns 0 for a service.

See also

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