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
Type Parameters
T
The type of the parameter value.
- Inheritance
-
StrategyParam<T>
- Implements
-
IPersistable
- Extension Methods
Constructors
StrategyParam(string)
Initializes a new instance of the StrategyParam<T>.
public StrategyParam(string name)
Parameters
name
stringParameter name.
StrategyParam(string, string)
Initializes a new instance of the StrategyParam<T>.
public StrategyParam(string id, string name)
Parameters
StrategyParam(string, string, T)
Initializes a new instance of the StrategyParam<T>.
public StrategyParam(string id, string name, T initialValue)
Parameters
StrategyParam(string, T)
Initializes a new instance of the StrategyParam<T>.
public StrategyParam(string name, T initialValue)
Parameters
name
stringParameter name.
initialValue
TThe initial value.
Properties
CanOptimize
Check can optimize parameter.
public bool CanOptimize { get; set; }
Property Value
Id
Parameter identifier.
public string Id { get; }
Property Value
Name
Parameter name.
public string Name { 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
Validator
Value validator.
public Func<T, bool> Validator { 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.
Save(SettingsStorage, bool)
Save settings.
public void Save(SettingsStorage storage, bool addDescription)
Parameters
storage
SettingsStorageEcng.Serialization.SettingsStorage
addDescription
boolAdd description info.
ToString()
public override string ToString()