diff --git a/PortfolioManager/Models/GainLossModel.cs b/PortfolioManager/Models/GainLossModel.cs index 3c5abc5..ced16fb 100644 --- a/PortfolioManager/Models/GainLossModel.cs +++ b/PortfolioManager/Models/GainLossModel.cs @@ -23,6 +23,22 @@ namespace PortfolioManager.Models return compositeDataSource; } + public static CompositeDataSource Price(Price price) + { + if (null == price) return Empty(); + SortedDateTimeDataAdapter sortedDateTimeDataAdapter = new SortedDateTimeDataAdapter(); + + + // CompositeDataSource compositeDataSource; + // var xData = new EnumerableDataSource(new DateTime[]{price.Date}); + // xData.SetXMapping(x => (x.Ticks / 10000000000.0)); + // var yData = new EnumerableDataSource(new double[]{price.Close}); + // yData.SetYMapping(y => y); + // compositeDataSource = xData.Join(yData); + // return compositeDataSource; + return Empty(); + } + // This is the active gain/loss as number or percent. public static CompositeDataSource GainLoss(ModelPerformanceSeries gainLossList, bool useGainLoss) { diff --git a/PortfolioManager/ViewModels/BollingerBandViewModel.cs b/PortfolioManager/ViewModels/BollingerBandViewModel.cs index 3a978e0..b8c8015 100644 --- a/PortfolioManager/ViewModels/BollingerBandViewModel.cs +++ b/PortfolioManager/ViewModels/BollingerBandViewModel.cs @@ -356,7 +356,7 @@ namespace PortfolioManager.ViewModels BinCollection acquiredSummariesBin=BinHelper.CreateBins(new BinItems(acquiredSummaries),3); - // compositeDataSourceZeroPoint = GainLossModel.Price(zeroPrice); + compositeDataSourceZeroPoint = GainLossModel.Price(zeroPrice); /* if(null!=stopLimits) {