def remove_algo_setting(self, setting_name: str): """""" if setting_name not in self.algo_settings: return self.algo_settings.pop(setting_name) event = Event(EVENT_ALGO_SETTING) event.data = {"setting_name": setting_name, "setting": None} self.event_engine.put(event) self.save_algo_setting()
def put_variables_event(self, algo: AlgoTemplate, variables: dict): """""" event = Event(EVENT_ALGO_VARIABLES) event.data = {"algo_name": algo.algo_name, "variables": variables} self.event_engine.put(event)
def put_parameters_event(self, algo: AlgoTemplate, parameters: dict): """""" event = Event(EVENT_ALGO_PARAMETERS) event.data = {"algo_name": algo.algo_name, "parameters": parameters} self.event_engine.put(event)
def put_setting_event(self, setting_name: str, setting: dict): """""" event = Event(EVENT_ALGO_SETTING) event.data = {"setting_name": setting_name, "setting": setting} self.event_engine.put(event)
def write_log(self, msg: str): """""" event = Event(EVENT_BACKTESTER_LOG) event.data = msg self.event_engine.put(event)