public TrendlineProcessor(ITrendlineAnalyzer analyzer) { this.analyzer = analyzer; }
public bool Start(AssetTimeframe atf, AnalysisType[] types) { this.Symbol = atf.Symbol(); this.types = types; try { Data = _dataService.GetFxQuotations(this.Symbol, true).ToArray(); Data.AppendIndexNumbers(); Debug.WriteLine(string.Format("+;SimulationService.Start - Data loaded (Items: {0})", Data.Length)); if (types.Contains(AnalysisType.Price)){ _priceAnalyzer = new PriceAnalyzer(atf); ((Analyzer)_priceAnalyzer).injectQuotationService(quotationService); } if (types.Contains(AnalysisType.Trendline)) { _trendAnalyzer = new TrendlineAnalyzer(atf); ((Analyzer)_trendAnalyzer).injectQuotationService(quotationService); } return true; } catch (Exception) { return false; } }