public Report Generate(IAnalysisResult result)
        {
            var stock  = result.Stock;
            var report = new Report("ClosedPricesChart", "Closed price chart: " + stock.Name);

            var chart        = new StockPriceChart(stock, Prices.ForStock(stock));
            var chartSection = new GenericChartSection("Closed prices", chart);

            report.Sections.Add(chartSection);

            return(report);
        }
        public Report Generate( IAnalysisResult result )
        {
            var stock = result.Stock;
            var report = new Report( "ClosedPricesChart", "Closed price chart: " + stock.Name );

            var chart = new StockPriceChart( stock, Prices.ForStock( stock ) );
            var chartSection = new GenericChartSection( "Closed prices", chart );

            report.Sections.Add( chartSection );

            return report;
        }
Beispiel #3
0
        private void AddChart( Data data )
        {
            var chart = new StockPriceChart( Name, myStock, data.Prices );

            foreach ( var entry in data.Points )
            {
                chart.IndicatorPoints.Add( entry.Key, entry.Value );
            }

            chart.Signals = data.Signals;

            var section = new GenericChartSection( Name, chart );
            Sections.Add( section );
        }
Beispiel #4
0
        private GenericChartSection CreateChartSection( TradingResult tradingResult )
        {
            var chart = new StockPriceChart( "TradingProtocol", tradingResult.Stock, tradingResult.Prices );

            var trades = tradingResult.TradingLog.Orders
                .Select( o => o.Timestamp )
                .ToList();
            var signals = tradingResult.SystemSignals
                .Where( s => trades.Contains( s.Time ) );
            chart.Signals = new SignalSeries( tradingResult.Prices, new SeriesIdentifier( new StockObjectIdentifier( tradingResult.Stock ), new ObjectDescriptor( "Trading" ) ), signals );

            AddIndicators( chart, tradingResult.SystemReport );

            var section = new GenericChartSection( "Chart", chart );
            return section;
        }
Beispiel #5
0
            public GenericChartSection Generate( SystemResult result )
            {
                var chart = new StockPriceChart( result.System, result.Stock, result.Prices );
                chart.Signals = result.Signals;

                var section = new GenericChartSection( "Chart", chart );
                return section;
            }