Optimization parameters

Screenshot: editor of optimization parameters

OptimizationParametersPanel - an editor of the parameters the sweep goes over. One row - one strategy parameter: the check box includes it into the sweep, then come the bounds and the step or the list of values, and under the table - the total: how many runs the current set gives.

Main properties

The set of values depends on the parameter type: for a number and for TimeSpan these are the bounds and the step, for bool - two values, for an enumeration, Security and DataType - an explicit list. A row that cannot be gone through (the step is zero, the bounds are not set, the list is empty) explains the reason right in the table, and the total counter does not count such a row.

The number of runs grows as a product, not as a sum: three parameters of five values each - that is 125 runs, not 15. That is why the counter stands next to the table and not on the next step of the wizard.

Below are code snippets showing its usage:

<Window x:Class="Sample.OptimizationWindow"
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:xaml="http://schemas.stocksharp.com/xaml"
	Height="400" Width="700">
	<xaml:OptimizationParametersPanel x:Name="ParametersPanel" />
</Window>
// The editor rows are the application model implementing IOptimizationParameterRow
ParametersPanel.Parameters = _rows;

// The cap on the number of runs
ParametersPanel.MaxIterations = 5000;

// Starting is allowed when the set is not empty and has no errors
StartButton.IsEnabled = ParametersPanel.TotalCount > 0 && ParametersPanel.FirstProblem.Length == 0;

See also

Strategies

Optimization results