private async Task ExecuteSelector( string strategyName, SelectorParams selectorParams, ISelector selector, dynamic config ) { List <string> symbols = await selector.GetSymbols(config); if (selectorParams.count < 0) { symbols = symbols.TakeLast(selectorParams.count).ToList(); } else { symbols = symbols.Take(selectorParams.count).ToList(); } Dictionary <string, dynamic> outputs = new Dictionary <string, dynamic>() { { "symbols", symbols } }; // TODO: cache outputs in parser and get from cache instead of DB await _database.SaveOutput(strategyName, "selector", outputs); }