-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathIE.java
44 lines (36 loc) · 1.13 KB
/
IE.java
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
package ievents;
/**
* Created by author.
*
* This class is built to hold information about an intrinsic event. It can be either a directional-change intrinsic
* event (IE), or an overshoot IE.
*/
public class IE {
private int type; // is a type of the IE: +1 or -1 for DC IEs, +2 and -2 for an overshoot IE
private long time; // is when the IE happened
private long level; // is the price level at which the IE happened
private double osL; // is overshoot length, in fraction of the previous DC price
private double sqrtOsDeviation; // is the squared overshoot deviation, (w(d) - d)^2
public IE(int type, long time, long level, double osL, double sqrtOsDeviation){
this.type = type;
this.time = time;
this.level = level;
this.osL = osL;
this.sqrtOsDeviation = sqrtOsDeviation;
}
public int getType() {
return type;
}
public long getTime() {
return time;
}
public long getLevel() {
return level;
}
public double getOsL() {
return osL;
}
public double getSqrtOsDeviation(){
return sqrtOsDeviation;
}
}