コード例 #1
0
        private void GetFulturePrice(object sender, RoutedEventArgs e)
        {
            IDataAnalyzer dataAnalyzer = new DataAnalyzer.DataAnalyzer();

            viewModel.display = "";
            var basicData0050 = Core.basicDailyDataManager.getBasicDailyData("0050");
            int count = 0, all = Core.stockListManager.getStockList().Select(x => x.ID).Count();

            foreach (var ID in Core.stockListManager.getStockList().Select(x => x.ID))
            {
                if (ID != "0050")
                {
                    dataAnalyzer.set0050BasicData(basicData0050);
                }
                string output = $"[GetFulturePrice ID = {ID}]  ({++count}/{all})\r\n";
                dataAnalyzer.setBasicDailyData(Core.basicDailyDataManager.getBasicDailyData(ID));
                dataAnalyzer.setAnalyzedData(Core.analyzedDataManager.getAnalyzedData(ID));
                dataAnalyzer.setFuturePriceData(Core.futurePriceDataManager.getFuturePriceData(ID));

                dataAnalyzer.calculateFuturePriceData();
                output += dataAnalyzer.getDisplay();

                Core.futurePriceDataManager.saveFuturePriceData(ID, dataAnalyzer.getFuturePriceData());
                viewModel.display = output + "\r\n" + viewModel.display;
                refreshText();
            }
        }