Class StrategyParam<T>
- Namespace
- StockSharp.Algo.Strategies
- Assembly
- StockSharp.Algo.dll
Wrapper for typified access to the strategy parameter.
public class StrategyParam<T> : NotifiableObject, INotifyPropertyChangedEx, INotifyPropertyChanging, IStrategyParam, IPersistable, INotifyPropertyChanged, IAttributesEntity
Type Parameters
TThe type of the parameter value.
- Inheritance
-
StrategyParam<T>
- Implements
- Inherited Members
- Extension Methods
Constructors
StrategyParam(string, T)
Initializes a new instance of the StrategyParam<T>.
public StrategyParam(string id, T initialValue = default)
Parameters
idstringParameter identifier.
initialValueTThe initial value.
Properties
Attributes
Gets the list of attributes associated with this entity.
public IList<Attribute> Attributes { get; }
Property Value
CanOptimize
Check can optimize parameter.
public bool CanOptimize { get; set; }
Property Value
Id
Parameter identifier.
public string Id { get; }
Property Value
OptimizeFrom
The From value at optimization.
public object OptimizeFrom { get; set; }
Property Value
OptimizeStep
The Increment value at optimization.
public object OptimizeStep { get; set; }
Property Value
OptimizeTo
The To value at optimization.
public object OptimizeTo { get; set; }
Property Value
Value
public T Value { get; set; }
Property Value
- T
Methods
Load(SettingsStorage)
Load settings.
public void Load(SettingsStorage storage)
Parameters
storageSettingsStorageSettings storage.
Save(SettingsStorage)
Save settings.
public void Save(SettingsStorage storage)
Parameters
storageSettingsStorageSettings storage.
SetBasic(bool)
public StrategyParam<T> SetBasic(bool basic = true)
Parameters
basicboolValue.
Returns
SetCanOptimize(bool)
Set CanOptimize value.
public StrategyParam<T> SetCanOptimize(bool canOptimize)
Parameters
canOptimizeboolThe value of CanOptimize.
Returns
- StrategyParam<T>
The strategy parameter.
SetDisplay(string, string, string)
Set display settings.
public StrategyParam<T> SetDisplay(string displayName, string description, string category)
Parameters
displayNamestringThe display name.
descriptionstringThe description of the diagram element parameter.
categorystringThe category of the diagram element parameter.
Returns
SetGreaterThanZero()
Set greater than zero validator.
public StrategyParam<T> SetGreaterThanZero()
Returns
SetHidden(bool)
Set BrowsableAttribute.
public StrategyParam<T> SetHidden(bool hidden = true)
Parameters
hiddenboolIs the parameter hidden in the editor.
Returns
SetNotNegative()
Set not negative validator.
public StrategyParam<T> SetNotNegative()
Returns
SetNullOrMoreZero()
Set null or more zero validator.
public StrategyParam<T> SetNullOrMoreZero()
Returns
SetNullOrNotNegative()
Set null or not negative validator.
public StrategyParam<T> SetNullOrNotNegative()
Returns
SetOptimize(T, T, T)
Fill optimization parameters.
public StrategyParam<T> SetOptimize(T optimizeFrom = default, T optimizeTo = default, T optimizeStep = default)
Parameters
optimizeFromTThe From value at optimization.
optimizeToTThe To value at optimization.
optimizeStepTThe Increment value at optimization.
Returns
- StrategyParam<T>
The strategy parameter.
SetRange(T, T)
Set range validator.
public StrategyParam<T> SetRange(T min, T max)
Parameters
minTMinimum value.
maxTMaximum value.
Returns
SetReadOnly(bool)
Set ReadOnlyAttribute.
public StrategyParam<T> SetReadOnly(bool value = true)
Parameters
valueboolValue.
Returns
SetRequired()
Set required validator.
public StrategyParam<T> SetRequired()
Returns
ToString()
public override string ToString()