TimeInMarketParameter

StockSharp.Algo.Statistics

The share of the observed time a position was open, in percent.

继承自: BaseStatisticParameter<decimal>

实现: IPositionStatisticParameter, IStatisticParameter, IAsyncPersistable, INotifyPropertyChanged, IDisposable

构造函数

TimeInMarketParameter
public TimeInMarketParameter()
timeInMarketParameter = TimeInMarketParameter()

Initializes a new instance of the TimeInMarketParameter.

方法

Add
public void Add(DateTime marketTime, decimal position)
timeInMarketParameter.Add(marketTime, position)

To add the new position value to the parameter.

marketTime
The exchange time.
position
The new position value.
LoadAsync
public override Task LoadAsync(SettingsStorage storage, CancellationToken cancellationToken)
result = timeInMarketParameter.LoadAsync(storage, cancellationToken)

To load the state of statistic parameter.

storage
Storage.
cancellationToken
CancellationToken

返回值: Task

Reset
public override void Reset()
timeInMarketParameter.Reset()

To reset the parameter value.

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

To save the state of statistic parameter.

storage
Storage.
cancellationToken
CancellationToken

返回值: Task