ProfitFactorParameter

StockSharp.Algo.Statistics

The ratio of the average profit of winning trades to the average loss of losing trades.

Inherits: BaseStatisticParameter<decimal>

Implements: ITradeStatisticParameter, IStatisticParameter, IAsyncPersistable, INotifyPropertyChanged, IDisposable

Constructors

ProfitFactorParameter
public ProfitFactorParameter()
profitFactorParameter = ProfitFactorParameter()

Initialize ProfitFactorParameter.

Methods

Add
public void Add(PnLInfo info)
profitFactorParameter.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 = profitFactorParameter.LoadAsync(storage, cancellationToken)

To load the state of statistic parameter.

storage
Storage.
cancellationToken
CancellationToken

Returns: Task

Reset
public override void Reset()
profitFactorParameter.Reset()

To reset the parameter value.

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

To save the state of statistic parameter.

storage
Storage.
cancellationToken
CancellationToken

Returns: Task