Skip to content

Commit fd59673

Browse files
committed
Add run.py
1 parent 4ab3e8e commit fd59673

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

script/run.py

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
from vnpy.event import EventEngine
2+
from vnpy.trader.engine import MainEngine
3+
from vnpy.trader.ui import MainWindow, create_qapp
4+
5+
from vnpy_ctp import CtpGateway
6+
from vnpy_algotrading import AlgoTradingApp
7+
8+
9+
def main():
10+
"""主入口函数"""
11+
qapp = create_qapp()
12+
13+
event_engine = EventEngine()
14+
main_engine = MainEngine(event_engine)
15+
main_engine.add_gateway(CtpGateway)
16+
main_engine.add_app(AlgoTradingApp)
17+
18+
main_window = MainWindow(main_engine, event_engine)
19+
main_window.showMaximized()
20+
21+
qapp.exec()
22+
23+
24+
if __name__ == "__main__":
25+
main()

0 commit comments

Comments
 (0)