private void JSON_Exit_Click(object sender, RoutedEventArgs e) { OpenFileDialog openFileDialog = new OpenFileDialog(); openFileDialog.Filter = "JSON files (*.json)|*.json"; JSONLoader jsonloader; if (openFileDialog.ShowDialog() == true) { jsonloader = new JSONLoader(openFileDialog.FileName); List <DateTime> dt = new List <DateTime>(); List <double> cd = new List <double>(); jsonloader.ForMacd(out dt, out cd); macdPoints = cd.Macd(12, 26, 9).ToList(); LoadDataSource(Monitor.GetReporter(jsonloader)); this.Loaded += OnLoaded; } }