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

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

            foreach (var stock in Core.stockListManager.getStockList())
            {
                string ID = stock.ID, type = stock.type;
                string output = $"[UpdateDiv ID = {ID}]({type}) ({++count}/{all})\r\n";
                dataAnalyzer.setStockType(type);
                if (ID != "0050")
                {
                    dataAnalyzer.set0050BasicData(basicData0050);
                }
                dataAnalyzer.setBasicDailyData(Core.basicDailyDataManager.getBasicDailyData(ID));
                dataAnalyzer.setAnalyzedData(Core.analyzedDataManager.getAnalyzedData(ID));

                dataAnalyzer.standarizeAnalyzeData();
                output           += dataAnalyzer.getDisplay();
                viewModel.display = output + "\r\n" + viewModel.display;

                Core.analyzedDataManager.saveAnalyzedData(ID, dataAnalyzer.getAnalyzedData());

                refreshText();
            }
        }
コード例 #2
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();
            }
        }
コード例 #3
0
        private void CalculateParameter(object sender, RoutedEventArgs e)
        {
            IDataAnalyzer dataAnalyzer = new DataAnalyzer.DataAnalyzer();

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

            foreach (var ID in Core.stockListManager.getStockList().Select(x => x.ID))
            {
                string output =
                    $"[CalculateParameter ID = {ID}]  ({++count}/{all})\r\n";
                dataAnalyzer.setBasicDailyData(Core.basicDailyDataManager.getBasicDailyData(ID));
                dataAnalyzer.setAnalyzedData(Core.analyzedDataManager.getAnalyzedData(ID));
                dataAnalyzer.setID(ID);
                dataAnalyzer.calculateParameter();
                output += dataAnalyzer.getDisplay();

                Core.analyzedDataManager.saveAnalyzedData(ID, dataAnalyzer.getAnalyzedData());

                viewModel.display = output + "\r\n" + viewModel.display;
                refreshText();
            }
        }