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