MQL4参考 标准常量,列举和架构 图表常量 图表时间表

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

ID

Value

Description

PERIOD_CURRENT

0

Current timeframe

PERIOD_M1

1

1 minute

PERIOD_M5

5

5 minutes

PERIOD_M15

15

15 minutes

PERIOD_M30

30

30 minutes

PERIOD_H1

60

1 hour

PERIOD_H4

240

4 hours

PERIOD_D1

1440

1 day

PERIOD_W1

10080

1 week

PERIOD_MN1

43200

1 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.

Constant

Value

Description

PERIOD_M2

2

2 minutes

PERIOD_M3

3

3 minutes

PERIOD_M4

4

4 minutes

PERIOD_M6

6

6 minutes

PERIOD_M10

10

10 minutes

PERIOD_M12

12

12 minutes

PERIOD_M20

20

20 minutes

PERIOD_H2

120

2 hours

PERIOD_H3

180

3 hours

PERIOD_H6

360

6 hours

PERIOD_H8

480

8 hours

PERIOD_H12

720

12 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