def __init__(self, config, crypto_currency, dispatchers_list, relevant_evaluators=None): if relevant_evaluators is None: relevant_evaluators = CONFIG_EVALUATORS_WILDCARD self.config = config self.crypto_currency = crypto_currency self.dispatchers_list = dispatchers_list self.symbol_evaluator_list = {} if Backtesting.enabled(self.config): self.social_eval_list = [] self.social_not_tasked_list = [] else: self.social_eval_list = EvaluatorCreator.create_social_eval( self.config, self.crypto_currency, self.dispatchers_list, relevant_evaluators) self.social_not_tasked_list = EvaluatorCreator.create_social_not_tasked_list( self.social_eval_list) self.social_evaluator_refresh_task = SocialEvaluatorNotTaskedUpdateTask( self.social_not_tasked_list)
def __init__(self, config, crypto_currency, dispatchers_list): self.crypto_currency = crypto_currency self.trader_simulator = None self.config = config self.traders = None self.trader_simulators = None self.finalize_enabled = False self.dispatchers_list = dispatchers_list self.evaluator_threads = [] self.matrix = EvaluatorMatrix() self.social_eval_list = EvaluatorCreator.create_social_eval( self.config, self.crypto_currency, self.dispatchers_list) self.social_not_threaded_list = EvaluatorCreator.create_social_not_threaded_list( self.social_eval_list) self.strategies_eval_list = EvaluatorCreator.create_strategies_eval_list( self.config) self.social_evaluator_refresh = SocialEvaluatorNotThreadedUpdateThread( self.social_not_threaded_list) self.global_social_updater = SocialGlobalUpdaterThread(self) self.evaluator_order_creator = EvaluatorOrderCreator() self.final_evaluator = FinalEvaluator(self)
def test_create_social_not_threaded_list(): evaluator, config = _get_tools() so_list = EvaluatorCreator.create_social_eval(config, evaluator.symbol, [], CONFIG_EVALUATORS_WILDCARD) not_thread_so_list = EvaluatorCreator.create_social_not_threaded_list( so_list) for evalator in not_thread_so_list: assert not evalator.is_threaded
def __init__(self, config, crypto_currency, dispatchers_list): self.config = config self.crypto_currency = crypto_currency self.dispatchers_list = dispatchers_list self.symbol_evaluator_list = {} if Backtesting.enabled(self.config): self.social_eval_list = [] self.social_not_threaded_list = [] else: self.social_eval_list = EvaluatorCreator.create_social_eval(self.config, self.crypto_currency, self.dispatchers_list) self.social_not_threaded_list = EvaluatorCreator.create_social_not_threaded_list(self.social_eval_list) self.social_evaluator_refresh = SocialEvaluatorNotThreadedUpdateThread(self.social_not_threaded_list)
def __init__(self, config, crypto_currency, dispatchers_list): self.config = config self.crypto_currency = crypto_currency self.dispatchers_list = dispatchers_list self.symbol_evaluator_list = {} if Backtesting.enabled(self.config): self.social_eval_list = [] self.social_not_threaded_list = [] else: self.social_eval_list = EvaluatorCreator.create_social_eval( self.config, self.crypto_currency, self.dispatchers_list) self.social_not_threaded_list = EvaluatorCreator.create_social_not_threaded_list( self.social_eval_list) self.social_evaluator_refresh = SocialEvaluatorNotThreadedUpdateThread( self.social_not_threaded_list)
def test_create_social_eval_list(): evaluator, config = _get_tools() so_list = EvaluatorCreator.create_social_eval(config, evaluator.symbol, [], CONFIG_EVALUATORS_WILDCARD) _assert_created_instances(so_list, SocialEvaluator, config)