forked from zonquan/TradeStation
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsfgf.setevents.txt
122 lines (103 loc) · 4.46 KB
/
sfgf.setevents.txt
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
[LegacyColorValue = true];
{
Function : sfgf.setevents
Description : Define this month's events
Copyright 2016 Scottfree Gains LLC
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
}
Inputs:
GYear(Numeric),
GMonth(Numeric),
Event[MaxSize1](NumericArrayRef),
EventName[MaxSize2](StringArrayRef);
Variables:
RMonday(1),
RTuesday(2),
RWednesday(3),
RThursday(4),
RFriday(5),
IDay(1),
ie(0),
rd(0),
EString(""),
FOMCDates(40),
ix(0);
Arrays:
FOMC[40, 3](0);
{Monthly Events}
ie = 0;
rd = sfgf.nthbday(1, GYear, GMonth);
Event[ie] = rd;
EventName[ie] = "ISM Report";
ie = ie + 1;
rd = sfgf.nthkday(1, RFriday, GYear, GMonth, 2);
Event[ie] = rd;
EventName[ie] = "Employment Report";
ie = ie + 1;
rd = sfgf.nthkday(2, RFriday, GYear, GMonth, 1);
Event[ie] = rd;
EventName[ie] = "Michigan Consumer Sentiment";
ie = ie + 1;
rd = sfgf.nthkday(3, RFriday, GYear, GMonth, 1);
Event[ie] = rd;
EventName[ie] = "Options Expiration";
{Specific Events}
EString = "FOMC Meeting";
ix = 0;
FOMC[ix, 1] = 2004; FOMC[ix, 2] = 01; FOMC[ix, 3] = 28; ix = ix + 1;
FOMC[ix, 1] = 2004; FOMC[ix, 2] = 03; FOMC[ix, 3] = 16; ix = ix + 1;
FOMC[ix, 1] = 2004; FOMC[ix, 2] = 05; FOMC[ix, 3] = 04; ix = ix + 1;
FOMC[ix, 1] = 2004; FOMC[ix, 2] = 06; FOMC[ix, 3] = 30; ix = ix + 1;
FOMC[ix, 1] = 2004; FOMC[ix, 2] = 08; FOMC[ix, 3] = 10; ix = ix + 1;
FOMC[ix, 1] = 2004; FOMC[ix, 2] = 09; FOMC[ix, 3] = 21; ix = ix + 1;
FOMC[ix, 1] = 2004; FOMC[ix, 2] = 11; FOMC[ix, 3] = 10; ix = ix + 1;
FOMC[ix, 1] = 2004; FOMC[ix, 2] = 12; FOMC[ix, 3] = 14; ix = ix + 1;
FOMC[ix, 1] = 2003; FOMC[ix, 2] = 01; FOMC[ix, 3] = 29; ix = ix + 1;
FOMC[ix, 1] = 2003; FOMC[ix, 2] = 03; FOMC[ix, 3] = 18; ix = ix + 1;
FOMC[ix, 1] = 2003; FOMC[ix, 2] = 05; FOMC[ix, 3] = 06; ix = ix + 1;
FOMC[ix, 1] = 2003; FOMC[ix, 2] = 06; FOMC[ix, 3] = 25; ix = ix + 1;
FOMC[ix, 1] = 2003; FOMC[ix, 2] = 08; FOMC[ix, 3] = 12; ix = ix + 1;
FOMC[ix, 1] = 2003; FOMC[ix, 2] = 09; FOMC[ix, 3] = 16; ix = ix + 1;
FOMC[ix, 1] = 2003; FOMC[ix, 2] = 10; FOMC[ix, 3] = 28; ix = ix + 1;
FOMC[ix, 1] = 2003; FOMC[ix, 2] = 12; FOMC[ix, 3] = 09; ix = ix + 1;
FOMC[ix, 1] = 2002; FOMC[ix, 2] = 01; FOMC[ix, 3] = 30; ix = ix + 1;
FOMC[ix, 1] = 2002; FOMC[ix, 2] = 03; FOMC[ix, 3] = 19; ix = ix + 1;
FOMC[ix, 1] = 2002; FOMC[ix, 2] = 05; FOMC[ix, 3] = 07; ix = ix + 1;
FOMC[ix, 1] = 2002; FOMC[ix, 2] = 06; FOMC[ix, 3] = 26; ix = ix + 1;
FOMC[ix, 1] = 2002; FOMC[ix, 2] = 08; FOMC[ix, 3] = 13; ix = ix + 1;
FOMC[ix, 1] = 2002; FOMC[ix, 2] = 09; FOMC[ix, 3] = 24; ix = ix + 1;
FOMC[ix, 1] = 2002; FOMC[ix, 2] = 11; FOMC[ix, 3] = 06; ix = ix + 1;
FOMC[ix, 1] = 2002; FOMC[ix, 2] = 12; FOMC[ix, 3] = 10; ix = ix + 1;
FOMC[ix, 1] = 2001; FOMC[ix, 2] = 01; FOMC[ix, 3] = 31; ix = ix + 1;
FOMC[ix, 1] = 2001; FOMC[ix, 2] = 03; FOMC[ix, 3] = 20; ix = ix + 1;
FOMC[ix, 1] = 2001; FOMC[ix, 2] = 05; FOMC[ix, 3] = 15; ix = ix + 1;
FOMC[ix, 1] = 2001; FOMC[ix, 2] = 06; FOMC[ix, 3] = 27; ix = ix + 1;
FOMC[ix, 1] = 2001; FOMC[ix, 2] = 08; FOMC[ix, 3] = 21; ix = ix + 1;
FOMC[ix, 1] = 2001; FOMC[ix, 2] = 10; FOMC[ix, 3] = 02; ix = ix + 1;
FOMC[ix, 1] = 2001; FOMC[ix, 2] = 11; FOMC[ix, 3] = 06; ix = ix + 1;
FOMC[ix, 1] = 2001; FOMC[ix, 2] = 12; FOMC[ix, 3] = 11; ix = ix + 1;
FOMC[ix, 1] = 2000; FOMC[ix, 2] = 02; FOMC[ix, 3] = 02; ix = ix + 1;
FOMC[ix, 1] = 2000; FOMC[ix, 2] = 03; FOMC[ix, 3] = 21; ix = ix + 1;
FOMC[ix, 1] = 2000; FOMC[ix, 2] = 05; FOMC[ix, 3] = 16; ix = ix + 1;
FOMC[ix, 1] = 2000; FOMC[ix, 2] = 06; FOMC[ix, 3] = 28; ix = ix + 1;
FOMC[ix, 1] = 2000; FOMC[ix, 2] = 08; FOMC[ix, 3] = 22; ix = ix + 1;
FOMC[ix, 1] = 2000; FOMC[ix, 2] = 10; FOMC[ix, 3] = 03; ix = ix + 1;
FOMC[ix, 1] = 2000; FOMC[ix, 2] = 11; FOMC[ix, 3] = 15; ix = ix + 1;
FOMC[ix, 1] = 2000; FOMC[ix, 2] = 12; FOMC[ix, 3] = 19; ix = ix + 1;
For ix = 0 To FOMCDates-1 Begin
ie = ie + 1;
rd = sfgf.gdate2rdate(FOMC[ix, 1], FOMC[ix, 2], FOMC[ix, 3]);
Event[ie] = rd;
EventName[ie] = EString;
End;
{Return Events}
ie = ie + 1;
sfgf.setevents = ie;