private IndicatorResult GenerateResult(IPriceSeries shortTermPoints, IPriceSeries longTermPoints) { var signals = Indicator.SignalGenerationStrategy.Generate(shortTermPoints, longTermPoints); var reportData = new GenericIndicatorReport.Data() { SignalOfDayUnderAnalysis = GetCurrentSignal(signals, longTermPoints), Prices = myPrices, Signals = signals }; reportData.Points[Indicator.ShortTerm.Name] = shortTermPoints; reportData.Points[Indicator.LongTerm.Name] = longTermPoints; var result = new IndicatorResult(Indicator.Name, Stock, reportData.SignalOfDayUnderAnalysis); if (Context.GenerateHistoricSignals) { result.Signals = signals; } result.Report = new DoubleCrossoverReport(Indicator, Stock, reportData); return(result); }
private IndicatorResult GenerateResult(IPriceSeries points) { var signals = Indicator.SignalGenerationStrategy.Generate(myPrices, points); var reportData = new GenericIndicatorReport.Data() { SignalOfDayUnderAnalysis = GetCurrentSignal(signals, points), Prices = myPrices, Signals = signals }; reportData.Points[Indicator.Name] = points; var result = new IndicatorResult(Indicator.Name, Stock, reportData.SignalOfDayUnderAnalysis); if (Context.GenerateHistoricSignals) { result.Signals = signals; } result.Report = new SmaReport(Indicator, Stock, reportData); return(result); }