veighna-global / vnpy_evo

The core module for using VeighNa (vnpy) quant trading platform on the crypto market.
MIT License
189 stars 41 forks source link

Readme has a mistake #48

Closed jikefan closed 2 months ago

jikefan commented 5 months ago

original text

from vnpy_evo.event import EventEngine
from vnpy_evo.trader.engine import MainEngine
from vnpy_evo.trader.ui import MainWindow, create_qapp

from vnpy_binance import BinanceUsdtGateway
from vnpy_ctastrategy import CtaStrategyApp
from vnpy_ctabacktester import CtaBacktesterApp

def main():
    qapp = create_qapp()

    event_engine = EventEngine()
    main_engine = MainEngine(event_engine)

    main_engine.add_gateway(BinanceUsdtGateway)
    main_engine.add_app(CtaStrategyApp)
    main_engine.add_app(CtaBacktesterApp)

    main_window = MainWindow(main_engine, event_engine)
    main_window.showMaximized()

    qapp.exec()

# if __name__ == "__main__"。 # There's a bug here
#     main()

# Modified to read as follows:
if __name__ == "__main__":
    main()
veighna-global commented 2 months ago

PR already merged. Thanks you!