DiagramStrategy

StockSharp.Diagram

其算法以图的形式呈现的策略.

继承自: Strategy

实现: INotifyPropertiesChanged

构造函数

DiagramStrategy
public DiagramStrategy()
diagramStrategy = DiagramStrategy()

初始化了 & ##DiagramStrategy+#的新实例.

属性

Composition
public CompositionDiagramElement Composition { get; set; }
value = diagramStrategy.Composition
diagramStrategy.Composition = value

战略图.

HistoryCalculated
protected override TimeSpan? HistoryCalculated { get; }
value = diagramStrategy.HistoryCalculated

从HistorySize的代码版本中计算出.

OrderBookSources
public override IEnumerable<IOrderBookSource> OrderBookSources { get; }
value = diagramStrategy.OrderBookSources

所有可能的IOrderBookMessage源可以通过OrderBookDrawing接收.

OverflowLimit
public int OverflowLimit { get; set; }
value = diagramStrategy.OverflowLimit
diagramStrategy.OverflowLimit = value

Max允许每次重复的元素防止堆栈溢出.

StartSecurities
internal IReadOnlyList<Security> StartSecurities { get; }
value = diagramStrategy.StartSecurities

Securities the diagram refers to at the start: Security and the security values of the elements' parameters, resolved through the security provider. Available to the elements from CancellationToken).

方法

CopyToAsync
protected override ValueTask CopyToAsync(Strategy copy, CancellationToken cancellationToken)
result = diagramStrategy.CopyToAsync(copy, cancellationToken)

Copy settings into .

copy
Strategy
cancellationToken
CancellationToken

返回值: ValueTask

DisposeManaged
protected override void DisposeManaged()
diagramStrategy.DisposeManaged()

释放资源。

Flush
public void Flush(DateTime time)
diagramStrategy.Flush(time)

平滑非触发( root) 元素 。

Flush``1
public void Flush<TMessage>(TMessage message)
diagramStrategy.Flush(message)

平滑非触发( root) 元素 。

GetWorkingPortfolios
public override IEnumerable<Portfolio> GetWorkingPortfolios()
result = diagramStrategy.GetWorkingPortfolios()

获得战略所需的所有项目。

返回值: 组合.

LoadAsync
public override Task LoadAsync(SettingsStorage storage, CancellationToken cancellationToken)
result = diagramStrategy.LoadAsync(storage, cancellationToken)

Load settings.

storage
SettingsStorage
cancellationToken
CancellationToken

返回值: Task

OnReseted
protected override void OnReseted()
diagramStrategy.OnReseted()

是从重置方法调用的。

OnStarted2
protected override void OnStarted2(DateTime time)
diagramStrategy.OnStarted2(time)

当开始方法被调用,ProcessState状态被取用起步值时,这种方法就被称为起步法.

time
The strategy start time.
OnStartedAsync
protected override ValueTask OnStartedAsync(DateTime time, CancellationToken cancellationToken)
result = diagramStrategy.OnStartedAsync(time, cancellationToken)

The method is called when the strategy has entered the started state, before DateTime). An exception stops the strategy the same way as one thrown from DateTime).

time
The strategy start time.
cancellationToken
Cancellation token.

返回值: ValueTask

OnStopped
protected override void OnStopped()
diagramStrategy.OnStopped()

当ProcessState进程状态被取出已停止的值时,该方法就被称为被取出.

RaisePropertiesChanged
protected virtual void RaisePropertiesChanged()
diagramStrategy.RaisePropertiesChanged()

呼叫可用的属性更改事件 。

SaveAsync
public override Task SaveAsync(SettingsStorage storage, CancellationToken cancellationToken)
result = diagramStrategy.SaveAsync(storage, cancellationToken)

Save settings.

storage
SettingsStorage
cancellationToken
CancellationToken

返回值: Task

SetCompositionAsync
public ValueTask SetCompositionAsync(CompositionDiagramElement composition, CancellationToken cancellationToken)
result = diagramStrategy.SetCompositionAsync(composition, cancellationToken)

Set Composition and apply to it the settings loaded before it was set.

composition
The strategy diagram.
cancellationToken
CancellationToken

返回值: ValueTask

事件

CompositionChanged
public event Action<CompositionDiagramElement> CompositionChanged
diagramStrategy.CompositionChanged += handler

战略图变换事件.

PropertiesChanged
public event Action PropertiesChanged
diagramStrategy.PropertiesChanged += handler

可用的属性更改事件 。