-
-
Notifications
You must be signed in to change notification settings - Fork 100
/
DateTime.enum.h
66 lines (60 loc) · 2.32 KB
/
DateTime.enum.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
//+------------------------------------------------------------------+
//| EA31337 framework |
//| Copyright 2016-2023, EA31337 Ltd |
//| https://github.com/EA31337 |
//+------------------------------------------------------------------+
/*
* This file is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
/**
* @file
* Includes DateTime's enums.
*/
#ifndef __MQL__
// Allows the preprocessor to include a header file when it is needed.
#pragma once
#endif
/* Defines datetime conditions. */
enum ENUM_DATETIME_CONDITION {
DATETIME_COND_IS_PEAK_HOUR = 1, // On peak hour
DATETIME_COND_NEW_HOUR, // On new hour
DATETIME_COND_NEW_DAY, // On new day
DATETIME_COND_NEW_WEEK, // On new week
DATETIME_COND_NEW_MONTH, // On new month
DATETIME_COND_NEW_YEAR, // On new year
FINAL_ENUM_DATETIME_CONDITION_ENTRY
};
/* Defines datetime units. */
enum ENUM_DATETIME_UNIT {
DATETIME_NONE = 0 << 0, // None
DATETIME_SECOND = 1 << 0, // Second
DATETIME_MINUTE = 1 << 1, // Minute
DATETIME_HOUR = 1 << 2, // Hour
DATETIME_DAY = 1 << 3, // Day
DATETIME_WEEK = 1 << 4, // Week
DATETIME_MONTH = 1 << 5, // Month
DATETIME_YEAR = 1 << 6, // Year
DATETIME_HMS = DATETIME_HOUR | DATETIME_MINUTE | DATETIME_SECOND,
DATETIME_YMD = DATETIME_YEAR | DATETIME_MONTH | DATETIME_DAY,
DATETIME_ALL = DATETIME_HMS | DATETIME_WEEK | DATETIME_YMD,
};
#ifndef __MQL__
enum ENUM_TIME {
TIME_NONE = 0 << 0, // None.
TIME_DATE = 1 << 0, // Formats date as yyyy.mm.dd.
TIME_MINUTES = 1 << 1, // Formats date as hh:mi.
TIME_SECONDS = 1 << 2, // Formats date as hh:mi:ss.
};
#endif