From 02c03f744432ad3bd6f9769a1ac77ccd36a2ecc8 Mon Sep 17 00:00:00 2001 From: "vn.py" Date: Mon, 5 Jun 2017 16:22:16 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=BF=AB=E9=80=9F=E5=AE=89?= =?UTF-8?q?=E8=A3=85=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- examples/VnTrader/run.py | 2 +- install.bat | 8 +++++++ vnpy/trader/app/dataRecorder/drEngine.py | 2 +- vnpy/trader/uiMainWindow.py | 27 ------------------------ 4 files changed, 10 insertions(+), 29 deletions(-) create mode 100644 install.bat diff --git a/examples/VnTrader/run.py b/examples/VnTrader/run.py index 81ae1f42..e174bd53 100644 --- a/examples/VnTrader/run.py +++ b/examples/VnTrader/run.py @@ -25,7 +25,7 @@ from vnpy.trader.app import (riskManager, dataRecorder, def main(): """主程序入口""" # 创建事件引擎 - ee = EventEngine2() + ee = EventEngine() # 创建主引擎 me = MainEngine(ee) diff --git a/install.bat b/install.bat new file mode 100644 index 00000000..1e76de77 --- /dev/null +++ b/install.bat @@ -0,0 +1,8 @@ +::Install Python Modules +pip install pymongo websocket-client msgpack-python qdarkstyle + +::Install Ta-Lib +conda install -c quantopian ta-lib=0.4.9 + +:: Install vn.py +python setup.py install \ No newline at end of file diff --git a/vnpy/trader/app/dataRecorder/drEngine.py b/vnpy/trader/app/dataRecorder/drEngine.py index 7e0ee6d0..56d8eba2 100644 --- a/vnpy/trader/app/dataRecorder/drEngine.py +++ b/vnpy/trader/app/dataRecorder/drEngine.py @@ -11,7 +11,7 @@ import os import copy from collections import OrderedDict from datetime import datetime, timedelta -from Queue import Queue +from Queue import Queue, Empty from threading import Thread from vnpy.event import Event diff --git a/vnpy/trader/uiMainWindow.py b/vnpy/trader/uiMainWindow.py index c49e8234..27d92ad9 100644 --- a/vnpy/trader/uiMainWindow.py +++ b/vnpy/trader/uiMainWindow.py @@ -218,33 +218,6 @@ class MainWindow(QtWidgets.QMainWindow): except KeyError: self.widgetDict['contractM'] = ContractManager(self.mainEngine) self.widgetDict['contractM'].show() - - #---------------------------------------------------------------------- - def openCta(self): - """打开CTA组件""" - try: - self.widgetDict['ctaM'].showMaximized() - except KeyError: - self.widgetDict['ctaM'] = CtaEngineManager(self.mainEngine.ctaEngine, self.eventEngine) - self.widgetDict['ctaM'].showMaximized() - - #---------------------------------------------------------------------- - def openDr(self): - """打开行情数据记录组件""" - try: - self.widgetDict['drM'].showMaximized() - except KeyError: - self.widgetDict['drM'] = DrEngineManager(self.mainEngine.drEngine, self.eventEngine) - self.widgetDict['drM'].showMaximized() - - #---------------------------------------------------------------------- - def openRm(self): - """打开组件""" - try: - self.widgetDict['rmM'].show() - except KeyError: - self.widgetDict['rmM'] = RmEngineManager(self.mainEngine.rmEngine, self.eventEngine) - self.widgetDict['rmM'].show() #---------------------------------------------------------------------- def closeEvent(self, event):