vnpy_evo icon indicating copy to clipboard operation
vnpy_evo copied to clipboard

Readme has a mistake

Open jikefan opened this issue 8 months ago • 0 comments

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

jikefan avatar Jun 13 '24 11:06 jikefan