ExpectancyParameter

StockSharp.Algo.Statistics

The average profit of winning trades minus the average loss of losing trades.

Inherits: BaseStatisticParameter<decimal>

Implements: ITradeStatisticParameter, IStatisticParameter, IAsyncPersistable, INotifyPropertyChanged, IDisposable

Constructors

ExpectancyParameter
public ExpectancyParameter()
expectancyParameter = ExpectancyParameter()

Initialize ExpectancyParameter.

Methods

Add
public void Add(PnLInfo info)
expectancyParameter.Add(info)

To add information about new trade to the parameter.

info
Information on new trade.
LoadAsync
public override Task LoadAsync(SettingsStorage storage, CancellationToken cancellationToken)
result = expectancyParameter.LoadAsync(storage, cancellationToken)

To load the state of statistic parameter.

storage
Storage.
cancellationToken
CancellationToken

Returns: Task

Reset
public override void Reset()
expectancyParameter.Reset()

To reset the parameter value.

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

To save the state of statistic parameter.

storage
Storage.
cancellationToken
CancellationToken

Returns: Task