This commit is contained in:
vn.py 2018-08-05 22:44:00 +08:00
parent 030e448d37
commit c430bc93c6
3 changed files with 21 additions and 20 deletions

View File

@ -12,7 +12,7 @@ from vnpy.trader.uiMainWindow import MainWindow
from vnpy.trader.gateway import futuGateway
# 加载上层应用
from vnpy.trader.app import riskManager#, ctaStrategy
from vnpy.trader.app import riskManager, ctaStrategy
#----------------------------------------------------------------------
@ -32,7 +32,7 @@ def main():
# 添加上层应用
me.addApp(riskManager)
#me.addApp(ctaStrategy)
me.addApp(ctaStrategy)
# 创建主窗口
mw = MainWindow(me, ee)

View File

@ -3,5 +3,5 @@
"mdAddress": "tcp://180.168.146.187:10031",
"tdAddress": "tcp://180.168.146.187:10030",
"userID": "000300",
"password": "19890624"
"password": "123456789"
}

View File

@ -84,7 +84,8 @@ def loadMcCsv(fileName, dbName, symbol):
collection.ensure_index([('datetime', pymongo.ASCENDING)], unique=True)
# 读取数据和插入到数据库
reader = csv.DictReader(file(fileName, 'r'))
with open(fileName, 'r') as f:
reader = csv.DictReader(f)
for d in reader:
bar = VtBarData()
bar.vtSymbol = symbol