TimeInMarketParameter

StockSharp.Algo.Statistics

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

Inherits: BaseStatisticParameter<decimal>

Implements: IPositionStatisticParameter, IStatisticParameter, IAsyncPersistable, INotifyPropertyChanged, IDisposable

Constructors

TimeInMarketParameter
public TimeInMarketParameter()
timeInMarketParameter = TimeInMarketParameter()

Initializes a new instance of the TimeInMarketParameter.

Methods

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

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

Returns: Task