uiBasicWidget.py 文件源码

python
阅读 26 收藏 0 点赞 0 评论 0

项目:InplusTrader_Linux 作者: zhengwsh 项目源码 文件源码
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??

    #----------------------------------------------------------------------
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号