Built-in Functions
Structures
Built-in Variables and Constants
Conventions
Exchanges
PERIOD
K-line period constants. Each value is the period in seconds, used as the period argument of exchange.GetRecords and similar functions. For other periods pass the number of seconds directly (for example 60 * 10 for 10 minutes).
| Constant | Value | Meaning |
|---|---|---|
PERIOD_M1 | 60 | 1-minute K-line period |
PERIOD_M3 | 180 | 3-minute K-line period |
PERIOD_M5 | 300 | 5-minute K-line period |
PERIOD_M15 | 900 | 15-minute K-line period |
PERIOD_M30 | 1800 | 30-minute K-line period |
PERIOD_H1 | 3600 | 1-hour K-line period |
PERIOD_H2 | 7200 | 2-hour K-line period |
PERIOD_H4 | 14400 | 4-hour K-line period |
PERIOD_H6 | 21600 | 6-hour K-line period |
PERIOD_H12 | 43200 | 12-hour K-line period |
PERIOD_D1 | 86400 | 1-day K-line period |
PERIOD_D3 | 259200 | 3-day K-line period |
PERIOD_W1 | 604800 | 1-week K-line period |
In this sectionRead the whole section
| Name | Description |
| PERIOD_M1 | 1-minute K-line period; the value is 60. |
| PERIOD_M3 | 3-minute K-line period; the value is 180. |
| PERIOD_M5 | 5-minute K-line period; the value is 300. |
| PERIOD_M15 | 15-minute K-line period; the value is 900. |
| PERIOD_M30 | 30-minute K-line period; the value is 1800. |
| PERIOD_H1 | 1-hour K-line period; the value is 3600. |
| PERIOD_H2 | 2-hour K-line period; the value is 7200. |
| PERIOD_H4 | 4-hour K-line period; the value is 14400. |
| PERIOD_H6 | 6-hour K-line period; the value is 21600. |
| PERIOD_H12 | 12-hour K-line period; the value is 43200. |
| PERIOD_D1 | 1-day K-line period; the value is 86400. |
| PERIOD_D3 | 3-day K-line period; the value is 259200. |
| PERIOD_W1 | 1-week K-line period; the value is 604800. |