-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmarketDataClass.py
More file actions
30 lines (27 loc) · 903 Bytes
/
marketDataClass.py
File metadata and controls
30 lines (27 loc) · 903 Bytes
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
class marketDataClass(object):
def __init__(self):
self.symbol = ""
self.minMove = 0
self.bigPtVal = 0
self.seed = 0
self.date = list()
self.open = list()
self.high = list()
self.low = list()
self.close = list()
self.volume = list()
self.opInt = list()
self.dataPoints = 0
def setDataAttributes(self,symbol,bigPtVal,minMove):
self.symbol = symbol
self.minMove = minMove
self.bigPtVal = bigPtVal
def readData(self,date,open,high,low,close,volume,opInt):
self.date.append(date)
self.open.append(open)
self.high.append(high)
self.low.append(low)
self.close.append(close)
self.volume.append(volume)
self.opInt.append(opInt)
self.dataPoints += 1