Search Framework:
ParameterList
Namespace: WealthLab.Core
Parent: List<Parameter>

The ParameterList class descends from List<Parameter> and contains Parameter instances. Various classes in the WealthLab code base expose a ParameterList as their Parameters property, including IndicatorBase, OptimizerBase, DrawingObjectBase, and many of the data provider base classes.

Members
AssignValues
public void AssignValues(List<double> values)

Assigns the Value of each contained Parameter from the corresponding double in the specified values list. ParameterList takes care of converting values to the appropriate numeric type, including converting values to int for ParameterType.Int32 Parameters.


Clone
public ParameterList Clone()

Returns a copy of the current ParameterList instance.


Description
public string Description

Contains an optional description that can be displayed in the parameter editor dialog for certain configurable items, such as Optimizers and Position Sizers.


FindByOptParamName
public Parameter FindByOptParamName(string name, bool makeOptOnly)

Searches for a Parameter whose OptParamName or OptParamLabel matches the specified name. If makeOptOnly is true, only Parameters whose MakeOptimizable property is true are considered. The search also recursively examines the IndicatorParameters of contained Parameters, allowing optimizable Parameters within indicators to be located. Returns null if no matching Parameter is found.


FindName
public Parameter FindName(string name)

Returns the Parameter whose Name matches the specified name, or null if no matching Parameter is found. The comparison is case-insensitive.


FirstOptimizedParameterIndex
public int FirstOptimizedParameterIndex

Returns the index of the first Parameter whose IsChecked property is true, indicating that it is participating in an optimization. Returns -1 if no Parameters are being optimized.


FixOptimizationValues
public void FixOptimizationValues()

Checks the current Value of each contained Parameter to ensure that it is valid for the Parameter's optimization range. If a Value does not correspond to a valid value in the sequence defined by MinValue, MaxValue, and StepValue, it is reset to an appropriate valid value.


GetStartIndex
public int GetStartIndex()

Examines Int32 Parameters whose names contain "PERIOD" and returns the largest current value. This can be used to determine an appropriate starting index when the Parameters represent indicator periods.


GetValues
public List<double> GetValues()

Returns a List<double> containing the current values of the Parameters. Each Parameter value is converted to double using its AsDouble property.


GetValuesEnumerator
public IEnumerable<List<double>> GetValuesEnumerator()

Enumerates all combinations of values represented by the Parameters that are enabled for optimization. Each returned List<double> contains one value for each Parameter. Parameters whose IsChecked property is false retain their current values, while checked Parameters iterate through their available optimization values.


HasParameterOfType
public bool HasParameterOfType(ParameterType pt)

Returns true if the ParameterList contains at least one Parameter whose Type matches the specified ParameterType.


IsAtDefaultState
public bool IsAtDefaultState

Returns true if all applicable Parameters have their current Value equal to their DefaultValue. Parameters associated with position-size optimization are not considered when determining the default state.


ParametersMarkedOptimizable
public ParameterList ParametersMarkedOptimizable

Returns a new ParameterList containing Parameters whose MakeOptimizable property is true. Nested IndicatorParameters are examined recursively, so optimizable Parameters within indicator Parameters are also included.


ParametersWithIndicatorParameters
public ParameterList ParametersWithIndicatorParameters

Returns a new ParameterList containing the applicable Parameters from this list as well as optimizable Parameters nested within their IndicatorParameters. Nested indicator Parameters are processed recursively.


ResetToDefaultState
public void ResetToDefaultState()

Resets the Value of each applicable Parameter to its DefaultValue. Parameters associated with position-size optimization are not changed.


SetDefaultValuesToValues
public void SetDefaultValuesToValues()

Sets the DefaultValue of each Parameter to its current Value.


TotalPermutations
public ulong TotalPermutations

Returns the total number of optimization permutations represented by the ParameterList. The value is calculated by multiplying the Permutations of each Parameter whose IsChecked property is true.


ValueOf
public object ValueOf(string name)

Returns the Value of the Parameter whose Name matches the specified name, or null if no matching Parameter is found. The comparison is case-insensitive.