Optimization results

Screenshot: optimization results

OptimizationResultsPanel - three ways to read the results of a sweep, collected in one control:

  • Results - a table of runs: the parameter values, the statistics and the P&L chart of every run next to its numbers. This is StrategiesStatisticsPanel, so the columns are sorted and configured the same way as everywhere else.
  • Chart - a three-dimensional surface over two parameters: the axes are chosen in the lists above the chart, the height - the selected statistics parameter.
  • Heatmap - the same surface from above. The axes are set once, on the chart, and the map repeats them.

Main properties

Runs are added to OptimizationResultsViewModel at the moment they start, not when they finish: the row appears in the table at once and then follows its strategy, so a running run is visible on all three surfaces.

One combination of parameters - one point of the surface. If a combination was run several times, the point shows the average; if a combination was not run at all, the heatmap fills it with the lowest value, so that a gap does not look like a peak.

Below are code snippets showing its usage:

<Window x:Class="Sample.OptimizationResultsWindow"
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:charting="http://schemas.stocksharp.com/xaml"
	Height="600" Width="900">
	<charting:OptimizationResultsPanel x:Name="ResultsPanel" />
</Window>
_results = new OptimizationResultsViewModel();
ResultsPanel.ViewModel = _results;

// The optimizer reports a run at the moment it starts
_optimizer.StrategyInitialized += (strategy, parameters) =>
	this.GuiAsync(() => _results.AddRun(strategy, parameters));

See also

Strategies

Optimization parameters