Exemple #1
0
def create_simulation_slots(gui):
    """
    Creates simulation slots.
    """
    gui.runSimulationButton.clicked.connect(
        lambda: gui.initiate_bot_thread(caller=SIMULATION))
    gui.endSimulationButton.clicked.connect(
        lambda: gui.end_bot_thread(caller=SIMULATION))
    gui.configureSimulationButton.clicked.connect(gui.show_simulation_settings)
    gui.forceLongSimulationButton.clicked.connect(
        lambda: gui.force_long(SIMULATION))
    gui.forceShortSimulationButton.clicked.connect(
        lambda: gui.force_short(SIMULATION))
    gui.pauseBotSimulationButton.clicked.connect(
        lambda: gui.pause_or_resume_bot(SIMULATION))
    gui.exitPositionSimulationButton.clicked.connect(
        lambda: gui.exit_position(SIMULATION, True))
    gui.waitOverrideSimulationButton.clicked.connect(
        lambda: gui.exit_position(SIMULATION, False))
    gui.enableSimulationCustomStopLossButton.clicked.connect(
        lambda: gui.set_custom_stop_loss(SIMULATION, True))
    gui.disableSimulationCustomStopLossButton.clicked.connect(
        lambda: gui.set_custom_stop_loss(SIMULATION, False))
    gui.clearSimulationTableButton.clicked.connect(
        lambda: clear_table(gui.simulationActivityMonitor))
    gui.clearSimulationTradesButton.clicked.connect(
        lambda: clear_table(gui.simulationHistoryTable))
    gui.exportSimulationTradesButton.clicked.connect(
        lambda: gui.export_trades(caller=SIMULATION))
    gui.importSimulationTradesButton.clicked.connect(
        lambda: gui.import_trades(caller=SIMULATION))
Exemple #2
0
def create_bot_slots(gui):
    """
    Creates bot slots.
    """
    gui.runBotButton.clicked.connect(
        lambda: gui.initiate_bot_thread(caller=LIVE))
    gui.endBotButton.clicked.connect(lambda: gui.end_bot_thread(caller=LIVE))
    gui.configureBotButton.clicked.connect(gui.show_main_settings)
    gui.forceLongButton.clicked.connect(lambda: gui.force_long(LIVE))
    gui.forceShortButton.clicked.connect(lambda: gui.force_short(LIVE))
    gui.pauseBotButton.clicked.connect(lambda: gui.pause_or_resume_bot(LIVE))
    gui.exitPositionButton.clicked.connect(
        lambda: gui.exit_position(LIVE, True))
    gui.waitOverrideButton.clicked.connect(
        lambda: gui.exit_position(LIVE, False))
    gui.enableCustomStopLossButton.clicked.connect(
        lambda: gui.set_custom_stop_loss(LIVE, True))
    gui.disableCustomStopLossButton.clicked.connect(
        lambda: gui.set_custom_stop_loss(LIVE, False))
    gui.clearTableButton.clicked.connect(
        lambda: clear_table(gui.activityMonitor))
    gui.clearLiveTradesButton.clicked.connect(
        lambda: clear_table(gui.historyTable))
    gui.exportLiveTradesButton.clicked.connect(
        lambda: gui.export_trades(caller=LIVE))
    gui.importLiveTradesButton.clicked.connect(
        lambda: gui.import_trades(caller=LIVE))
Exemple #3
0
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)