private void ButtonAnalyse_Click(object sender, RoutedEventArgs e) { SwapCollection swapCollection = new SwapCollection(); string initPath = StartupParameters.DefaultSourcePath; swapCollection.LoadSwap(System.IO.Path.Combine(initPath, SwapCollection.SwapFileName)); foreach (SymbolChooser.SymbolViewItem svi in symbolChooser.SymbolViewItems) { foreach (Analysis.ResetTimeAnalysis.SideAnalyser currSide in ChosenSides) { ResetTimeViewModel rt = new ResetTimeViewModel(svi.FullPath, svi.Symbol, currSide, Int32.Parse(TextBoxWorkingPercentTime.Text), swapCollection); if (CheckBoxStrategyPointAnalyse.IsChecked.Value) { rt.AnalyseStrategy(DatePickerFrom.SelectedDate, DatePickerTo.SelectedDate); } if (CheckBoxAllPointAnalyse.IsChecked.Value) { rt.AnalyseAllPoints(DatePickerFrom.SelectedDate, DatePickerTo.SelectedDate); } } } System.Windows.MessageBox.Show("ButtonAnalyse_Click was done"); }
private void ButtonTestStrategy_Click(object sender, RoutedEventArgs e) { ResetTimeViewModel rt = new ResetTimeViewModel(symbolChooser.SelectedItemPath, symbolChooser.SelectedItemName, Analysis.ResetTimeAnalysis.SideAnalyser.Buy, 100, null); if (rt.Test()) { System.Windows.MessageBox.Show("Strategy works properly"); } else { System.Windows.MessageBox.Show("Strategy works with errors for fast engine", "Error", MessageBoxButton.OK, MessageBoxImage.Error); } }