Skip to content

Chart Timeframes

Chart Timeframes

All predefined timeframes of charts have unique identifiers. The PERIOD_CURRENT identifier means the current period of a chart, at which a mql4-program is running.

ENUM_TIMEFRAMES

IDValueDescription
PERIOD_CURRENT0Current timeframe
PERIOD_M111 minute
PERIOD_M555 minutes
PERIOD_M151515 minutes
PERIOD_M303030 minutes
PERIOD_H1601 hour
PERIOD_H42404 hours
PERIOD_D114401 day
PERIOD_W1100801 week
PERIOD_MN1432001 month

The ENUM_TIMEFRAMES enumeration contains the values of standard timeframes, online charts of financial instruments can be plotted only on these time intervals.

Below are non-standard timeframes, in MQL4 they are constants.

ConstantValueDescription
PERIOD_M222 minutes
PERIOD_M333 minutes
PERIOD_M444 minutes
PERIOD_M666 minutes
PERIOD_M101010 minutes
PERIOD_M121212 minutes
PERIOD_M202020 minutes
PERIOD_H21202 hours
PERIOD_H31803 hours
PERIOD_H63606 hours
PERIOD_H84808 hours
PERIOD_H1272012 hours

These periods can be used for working with offline charts.

Note

The constants of non-standard timeframes are included in the MQL4 language to enable translation and compilation of MQL5 programs, where these timeframes are standard and are included in the ENUM_TIMEFRAMES enumeration.

See also

PeriodSeconds(), Period(), Date and Time, Visibility of objects

Last updated on