Table of Contents

Class DiagramStrategy

Namespace
StockSharp.Diagram
Assembly
StockSharp.Diagram.Core.dll

The strategy whose algorithm is presented in the form of a diagram.

public class DiagramStrategy : Strategy, IPersistable, INotifyPropertyChangedEx, INotifyPropertyChanged, IMarketRuleContainer, ILogReceiver, ILogSource, IDisposable, ICloneable<Strategy>, ICloneable, IMarketDataProvider, ISubscriptionProvider, ISecurityProvider, ISecurityMessageProvider, ITransactionProvider, IPositionProvider, IPortfolioProvider, IScheduledTask, ICustomTypeDescriptor, INotifyPropertiesChanged
Inheritance
DiagramStrategy
Implements
IPersistable
INotifyPropertyChangedEx
ICloneable<Strategy>
INotifyPropertiesChanged
Inherited Members
Extension Methods

Constructors

DiagramStrategy()

Initializes a new instance of the DiagramStrategy.

public DiagramStrategy()

Properties

Composition

The strategy diagram.

[Browsable(false)]
public CompositionDiagramElement Composition { get; set; }

Property Value

CompositionDiagramElement

HistoryCalculated

Calculated from code version of HistorySize.

protected override TimeSpan? HistoryCalculated { get; }

Property Value

TimeSpan?

OrderBookSources

All possible IOrderBookMessage sources that can be received via OrderBookDrawing.

public override IEnumerable<IOrderBookSource> OrderBookSources { get; }

Property Value

IEnumerable<IOrderBookSource>

OverflowLimit

Max allowed elements per iteration to prevent stack overflow.

[Display(ResourceType = typeof(LocalizedStrings), GroupName = "Settings", Name = "Overflow", Description = "OverflowLimit", Order = 301)]
public int OverflowLimit { get; set; }

Property Value

int

UseStrategyParameterValues

Use strategy parameters values for composition properties.

[Browsable(false)]
public bool UseStrategyParameterValues { get; set; }

Property Value

bool

Methods

Clone()

Create a copy of DiagramStrategy.

public override Strategy Clone()

Returns

Strategy

Copy.

DisposeManaged()

Release resources.

protected override void DisposeManaged()

Flush(DateTimeOffset)

Flush non trigger (root) elements.

public void Flush(DateTimeOffset time)

Parameters

time DateTimeOffset

Flush<TMessage>(TMessage)

Flush non trigger (root) elements.

public void Flush<TMessage>(TMessage message) where TMessage : ILocalTimeMessage

Parameters

message TMessage

Type Parameters

TMessage

GetWorkingPortfolios()

Get all portfolios required for strategy.

public override IEnumerable<Portfolio> GetWorkingPortfolios()

Returns

IEnumerable<Portfolio>

Portfolios.

GetWorkingSecurities()

Get all securities required for strategy.

public override IEnumerable<Security> GetWorkingSecurities()

Returns

IEnumerable<Security>

Securities.

Load(SettingsStorage)

Load settings.

public override void Load(SettingsStorage storage)

Parameters

storage SettingsStorage

Settings storage.

NeedShowProperty(PropertyDescriptor)

It returns true, if the property is to be displayed in the settings.

protected virtual bool NeedShowProperty(PropertyDescriptor propertyDescriptor)

Parameters

propertyDescriptor PropertyDescriptor

The property description.

Returns

bool

true, if necessary to show the property, otherwise false.

OnReseted()

It is called from the Reset() method.

protected override void OnReseted()

OnStarted(DateTimeOffset)

The method is called when the Start() method has been called and the ProcessState state has been taken the Started value.

protected override void OnStarted(DateTimeOffset time)

Parameters

time DateTimeOffset

OnStopped()

The method is called when the ProcessState process state has been taken the Stopped value.

protected override void OnStopped()

RaisePropertiesChanged()

To call the available properties change event.

protected virtual void RaisePropertiesChanged()

Save(SettingsStorage)

Save settings.

public override void Save(SettingsStorage storage)

Parameters

storage SettingsStorage

Settings storage.

Events

CompositionChanged

The strategy diagram change event.

public event Action<CompositionDiagramElement> CompositionChanged

Event Type

Action<CompositionDiagramElement>

PropertiesChanged

The available properties change event.

public event Action PropertiesChanged

Event Type

Action