Closed zhaole0451 closed 7 months ago
from vnpy.event import EventEngine from vnpy.trader.engine import MainEngine from vnpy.trader.ui import MainWindow, create_qapp
from vnpy_qmt.qmt_gateway import QmtGateway
from vnpy_ctastrategy import CtaEngine, CtaStrategyApp from vnpy_ctastrategy import CtaStrategyApp
from vnpy_datarecorder import DataRecorderApp
from vnpy_ctabacktester import CtaBacktesterApp from vnpy_datamanager import DataManagerApp
def main(): """Start VN Trader""" qapp = create_qapp()
event_engine = EventEngine() main_engine = MainEngine(event_engine) main_engine.add_app(CtaStrategyApp) # 添加gateway main_engine.add_gateway(QmtGateway, gateway_name="QMT") main_engine.add_app(CtaStrategyApp) main_engine.add_app(CtaBacktesterApp) main_engine.add_app(DataRecorderApp) main_engine.add_app(DataManagerApp) main_window = MainWindow(main_engine, event_engine) main_window.showMaximized() qapp.exec()
if name == "main": main() 在非交易时间段,显示正常,当然也没有数据产生 但是,如果 在交易时间段,在界面阶段就出错
vnpy版本更新后,时间需要设置时区。时间时区缺失问题 ,已经修复 #9
-- coding:utf-8 --
from vnpy.event import EventEngine from vnpy.trader.engine import MainEngine from vnpy.trader.ui import MainWindow, create_qapp
导入QMT gateway
from vnpy_qmt.qmt_gateway import QmtGateway
from vnpy_ctastrategy import CtaEngine, CtaStrategyApp from vnpy_ctastrategy import CtaStrategyApp
from vnpy_datarecorder import DataRecorderApp
from vnpy_ctabacktester import CtaBacktesterApp from vnpy_datamanager import DataManagerApp
def main(): """Start VN Trader""" qapp = create_qapp()
if name == "main": main() 在非交易时间段,显示正常,当然也没有数据产生
但是,如果 在交易时间段,在界面阶段就出错
![Snipaste_2024-01-30_10-06-05](https://github.com/ruyisee/vnpy_qmt/assets/109886945/85a93739-3f0c-4149-8869-8bbec5d9c028)