def initHistoricalData(self, symbol):
"""??????"""
d = {}
cx = self.mainEngine.dbQuery(MINUTE_DB_NAME, symbol, d)
if cx:
for data in cx:
date = datetime.strptime(data['date'], "%Y%m%d")
n = date2num(date)
o = data['open'] # OHLC
h = data['high']
l = data['low']
c = data['close']
oi = data['openInterest']
self.listBar.append((n, o, c, l, h))
self.listOpen.append(o)
self.listClose.append(c)
self.listHigh.append(h)
self.listLow.append(l)
self.listOpenInterest.append(oi)
self.initCompleted = True # ????????
print "initCompleted!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
self.plotKline() # K??
#----------------------------------------------------------------------
评论列表
文章目录