Table of Contents

Class StrategyParamHelper

Namespace
StockSharp.Algo.Strategies
Assembly
StockSharp.Algo.dll

The auxiliary class for StrategyParam<T>.

public static class StrategyParamHelper
Inheritance
StrategyParamHelper
Inherited Members

Methods

CanOptimize(Type)

Check can optimize parameter.

public static bool CanOptimize(this Type type)

Parameters

type Type

The type of the parameter value.

Returns

bool

true, if can optimize the parameter, otherwise, false.

CanOptimize<T>(StrategyParam<T>, bool)

Set CanOptimize value.

public static StrategyParam<T> CanOptimize<T>(this StrategyParam<T> param, bool canOptimize)

Parameters

param StrategyParam<T>

The strategy parameter.

canOptimize bool

The value of CanOptimize.

Returns

StrategyParam<T>

The strategy parameter.

Type Parameters

T

The type of the parameter value.

NotNull<T>(StrategyParam<T>)

Set not null validator.

public static StrategyParam<T> NotNull<T>(this StrategyParam<T> param)

Parameters

param StrategyParam<T>

StrategyParam<T>

Returns

StrategyParam<T>

StrategyParam<T>

Type Parameters

T

StrategyParam<T> type.

Optimize<T>(StrategyParam<T>, T, T, T)

Fill optimization parameters.

public static StrategyParam<T> Optimize<T>(this StrategyParam<T> param, T optimizeFrom = default, T optimizeTo = default, T optimizeStep = default)

Parameters

param StrategyParam<T>

The strategy parameter.

optimizeFrom T

The From value at optimization.

optimizeTo T

The To value at optimization.

optimizeStep T

The Increment value at optimization.

Returns

StrategyParam<T>

The strategy parameter.

Type Parameters

T

The type of the parameter value.

Param<T>(Strategy, string, string, T)

Initializes a new instance of the StrategyParam<T>.

public static StrategyParam<T> Param<T>(this Strategy strategy, string id, string name, T initialValue = default)

Parameters

strategy Strategy

Strategy.

id string

Parameter identifier.

name string

Parameter name.

initialValue T

The initial value.

Returns

StrategyParam<T>

The strategy parameter.

Type Parameters

T

The type of the parameter value.

Param<T>(Strategy, string, T)

Initializes a new instance of the StrategyParam<T>.

public static StrategyParam<T> Param<T>(this Strategy strategy, string name, T initialValue = default)

Parameters

strategy Strategy

Strategy.

name string

Parameter name.

initialValue T

The initial value.

Returns

StrategyParam<T>

The strategy parameter.

Type Parameters

T

The type of the parameter value.

SetValidator<T>(StrategyParam<T>, Func<T, bool>)

Set parameter validator.

public static StrategyParam<T> SetValidator<T>(this StrategyParam<T> param, Func<T, bool> validator)

Parameters

param StrategyParam<T>

StrategyParam<T>

validator Func<T, bool>

Validator

Returns

StrategyParam<T>

StrategyParam<T>

Type Parameters

T

StrategyParam<T> type.