コード例 #1
0
        private async void analyze()
        {
            StatusWindow win2 = new StatusWindow();
            win2.Show();

            InputParams i = new InputParams();
            i.numOfStocks = Int32.Parse(this.numOfStocks.Text);
            i.daysAgo = Int32.Parse(this.daysAgo.Text);
            i.clusters = Int32.Parse(this.clusters.Text);
            i.open = (bool)open.IsChecked;
            i.close = (bool)close.IsChecked;
            i.high = (bool)high.IsChecked;
            i.low = (bool)low.IsChecked;

            var im = new Managers.InputManager(i);
            await Task.Run(() => im.GetInputReady());

            var fm = new FilesManager(i.clusters);
            //await Task.Run(() => fm.TestRun());
            await Task.Run(() => fm.Start());
            win2.Close();

            var om = new OutputManager(im.allStocksData);
            ResultsWindow graphs = new ResultsWindow(om.clusters);
            graphs.Show();
        }
コード例 #2
0
ファイル: Models.cs プロジェクト: Dudu876/StockAnalayze
        public StockData Normalize(InputParams features, StockData minData, StockData maxData)
        {
            var normalizedData = new StockData
            {
                Date = Date
            };

            if (features.open)
            {
                normalizedData.Open = NormalizeData(Open.Value, minData.Open.Value, maxData.Open.Value);
            }

            if (features.close)
            {
                normalizedData.Close = NormalizeData(Close.Value, minData.Close.Value, maxData.Close.Value);
            }

            if (features.high)
            {
                normalizedData.High = NormalizeData(High.Value, minData.High.Value, maxData.High.Value);
            }

            if (features.low)
            {
                normalizedData.Low = NormalizeData(Low.Value, minData.Low.Value, maxData.Low.Value);
            }

            return normalizedData;
        }
コード例 #3
0
ファイル: InputManager.cs プロジェクト: Dudu876/StockAnalayze
 public InputManager(InputParams i)
 {
     _inputParams = i;
     allStocksData = new Dictionary<string, Stock>();
 }
コード例 #4
0
ファイル: InputManager.cs プロジェクト: Dudu876/StockAnalayze
 public InputManager(InputParams i)
 {
     _inputParams  = i;
     allStocksData = new Dictionary <string, Stock>();
 }