def create_action_slots(gui): """ Creates actions slots. """ gui.otherCommandsAction.triggered.connect(lambda: show_and_bring_window_to_front(gui.otherCommands)) gui.configurationAction.triggered.connect(lambda: show_and_bring_window_to_front(gui.configuration)) gui.aboutAlgobotAction.triggered.connect(lambda: show_and_bring_window_to_front(gui.about)) gui.liveStatisticsAction.triggered.connect(lambda: gui.show_statistics(0)) gui.simulationStatisticsAction.triggered.connect(lambda: gui.show_statistics(1)) gui.openBacktestResultsFolderAction.triggered.connect(lambda: open_folder("Backtest Results")) gui.openOptimizerResultsFolderAction.triggered.connect(lambda: open_folder('Optimizer Results')) gui.openVolatilityResultsFolderAction.triggered.connect(lambda: open_folder('Volatility Results')) gui.openLogFolderAction.triggered.connect(lambda: open_folder("Logs")) gui.openCsvFolderAction.triggered.connect(lambda: open_folder('CSV')) gui.openDatabasesFolderAction.triggered.connect(lambda: open_folder('Databases')) gui.openCredentialsFolderAction.triggered.connect(lambda: open_folder('Credentials')) gui.openConfigurationsFolderAction.triggered.connect(lambda: open_folder('Configuration')) gui.sourceCodeAction.triggered.connect(lambda: webbrowser.open("https://github.com/ZENALC/algobot")) gui.tradingViewLiveAction.triggered.connect(lambda: gui.open_trading_view(LIVE)) gui.tradingViewSimulationAction.triggered.connect(lambda: gui.open_trading_view(SIMULATION)) gui.tradingViewBacktestAction.triggered.connect(lambda: gui.open_trading_view(BACKTEST)) gui.tradingViewHomepageAction.triggered.connect(lambda: gui.open_trading_view(None)) gui.binanceHomepageAction.triggered.connect(lambda: gui.open_binance(None)) gui.binanceLiveAction.triggered.connect(lambda: gui.open_binance(LIVE)) gui.binanceSimulationAction.triggered.connect(lambda: gui.open_binance(SIMULATION)) gui.binanceBacktestAction.triggered.connect(lambda: gui.open_binance(BACKTEST)) gui.wikiAction.triggered.connect(lambda: webbrowser.open("https://github.com/ZENALC/algobot/wiki"))
def create_backtest_slots(gui): """ Creates backtest slots. """ gui.configureBacktestButton.clicked.connect(gui.show_backtest_settings) gui.runBacktestButton.clicked.connect(gui.initiate_backtest) gui.endBacktestButton.clicked.connect(gui.end_backtest_thread) gui.clearBacktestTableButton.clicked.connect(lambda: clear_table(gui.backtestTable)) gui.viewBacktestsButton.clicked.connect(lambda: open_folder("Backtest Results")) gui.backtestResetCursorButton.clicked.connect(gui.reset_backtest_cursor)