private void GetResults(object sender, GetFinishedOrdersForRemoteCalculationCompletedEventArgs e) { _client.GetFinishedOrdersForRemoteCalculationCompleted -= GetResults; foreach (var res in e.Result) { if (res.Parameters != null) { Results.Add(new ResultDescription() { Id = res.Id, DateFrom = res.DateFrom.ToShortDateString(), DateTo = res.DateTo.ToShortDateString(), InstrumentName = res.InstrumentName, Period = PeriodsList[res.Period], StrategyName = Calculators.Single(o => o.Id == _selectedCalcId).StrategyName, Parameters = string.Join("-", res.Parameters), StopLoss = res.StopLoss, Balance = res.TotalBalance, Gap = res.Gap, SelectCoeff = res.TotalBalance * res.TotalBalance / res.Gap }); } } Results = new ObservableCollection <ResultDescription>(Results.OrderByDescending(o => o.SelectCoeff)); SelectedContent = new Results(); }