Class StrategyParam<T>
- Namespace
- StockSharp.Algo.Strategies
- Assembly
- StockSharp.Algo.dll
Wrapper for typified access to the strategy parameter.
public class StrategyParam<T> : NotifiableObject, IStrategyParam, IPersistable, INotifyPropertyChanged, IAttributesEntity
Type Parameters
T
The type of the parameter value.
- Inheritance
-
StrategyParam<T>
- Implements
-
IPersistableIAttributesEntity
- Extension Methods
Constructors
StrategyParam(string, T)
Initializes a new instance of the StrategyParam<T>.
public StrategyParam(string id, T initialValue = default)
Parameters
id
stringParameter identifier.
initialValue
TThe initial value.
Properties
Attributes
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 virtual T Value { get; set; }
Property Value
- T
Methods
Load(SettingsStorage)
Load settings.
public void Load(SettingsStorage storage)
Parameters
storage
SettingsStorageSettings storage.
Save(SettingsStorage)
Save settings.
public void Save(SettingsStorage storage)
Parameters
storage
SettingsStorageSettings storage.
SetBasic(bool)
Set Ecng.ComponentModel.BasicSettingAttribute.
public StrategyParam<T> SetBasic(bool basic = true)
Parameters
basic
boolValue.
Returns
SetCanOptimize(bool)
Set CanOptimize value.
public StrategyParam<T> SetCanOptimize(bool canOptimize)
Parameters
canOptimize
boolThe 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
displayName
stringThe display name.
description
stringThe description of the diagram element parameter.
category
stringThe category of the diagram element parameter.
Returns
SetHidden(bool)
Set BrowsableAttribute.
public StrategyParam<T> SetHidden(bool hidden = true)
Parameters
hidden
boolIs the parameter hidden in the editor.
Returns
SetOptimize(T, T, T)
Fill optimization parameters.
public StrategyParam<T> SetOptimize(T optimizeFrom = default, T optimizeTo = default, T optimizeStep = default)
Parameters
optimizeFrom
TThe From value at optimization.
optimizeTo
TThe To value at optimization.
optimizeStep
TThe Increment value at optimization.
Returns
- StrategyParam<T>
The strategy parameter.
SetReadOnly(bool)
Set ReadOnlyAttribute.
public StrategyParam<T> SetReadOnly(bool value = true)
Parameters
value
boolValue.
Returns
ToString()
public override string ToString()