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);
        }
예제 #2
0
        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;
        }
예제 #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 );
        }
예제 #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;
        }
예제 #5
0
파일: TradingSystem.cs 프로젝트: bg0jr/Maui
            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;
            }