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
TypeThe type of the parameter value.
Returns
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
boolThe 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>
Returns
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
TThe From value at optimization.
optimizeTo
TThe To value at optimization.
optimizeStep
TThe 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
StrategyStrategy.
id
stringParameter identifier.
name
stringParameter name.
initialValue
TThe 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
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>validator
Func<T, bool>
Returns
Type Parameters
T
StrategyParam<T> type.