Table of Contents

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
IPersistable
IAttributesEntity
Extension Methods

Constructors

StrategyParam(string, T)

Initializes a new instance of the StrategyParam<T>.

public StrategyParam(string id, T initialValue = default)

Parameters

id string

Parameter identifier.

initialValue T

The initial value.

Properties

Attributes

public IList<Attribute> Attributes { get; }

Property Value

IList<Attribute>

CanOptimize

Check can optimize parameter.

public bool CanOptimize { get; set; }

Property Value

bool

Id

Parameter identifier.

public string Id { get; }

Property Value

string

OptimizeFrom

The From value at optimization.

public object OptimizeFrom { get; set; }

Property Value

object

OptimizeStep

The Increment value at optimization.

public object OptimizeStep { get; set; }

Property Value

object

OptimizeTo

The To value at optimization.

public object OptimizeTo { get; set; }

Property Value

object

Value

public virtual T Value { get; set; }

Property Value

T

Methods

Load(SettingsStorage)

Load settings.

public void Load(SettingsStorage storage)

Parameters

storage SettingsStorage

Settings storage.

Save(SettingsStorage)

Save settings.

public void Save(SettingsStorage storage)

Parameters

storage SettingsStorage

Settings storage.

SetBasic(bool)

Set Ecng.ComponentModel.BasicSettingAttribute.

public StrategyParam<T> SetBasic(bool basic = true)

Parameters

basic bool

Value.

Returns

StrategyParam<T>

StrategyParam<T>

SetCanOptimize(bool)

Set CanOptimize value.

public StrategyParam<T> SetCanOptimize(bool canOptimize)

Parameters

canOptimize bool

The 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 string

The display name.

description string

The description of the diagram element parameter.

category string

The category of the diagram element parameter.

Returns

StrategyParam<T>

StrategyParam<T>

SetHidden(bool)

public StrategyParam<T> SetHidden(bool hidden = true)

Parameters

hidden bool

Is the parameter hidden in the editor.

Returns

StrategyParam<T>

StrategyParam<T>

SetOptimize(T, T, T)

Fill optimization parameters.

public StrategyParam<T> SetOptimize(T optimizeFrom = default, T optimizeTo = default, T optimizeStep = default)

Parameters

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.

SetReadOnly(bool)

public StrategyParam<T> SetReadOnly(bool value = true)

Parameters

value bool

Value.

Returns

StrategyParam<T>

StrategyParam<T>

ToString()

public override string ToString()

Returns

string