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):