Table of Contents

Class PnLManager

Namespace
StockSharp.Algo.PnL
Assembly
StockSharp.Algo.dll

The profit-loss manager.

public class PnLManager : IPnLManager, IPersistable
Inheritance
PnLManager
Implements
IPersistable
Inherited Members
Extension Methods

Constructors

PnLManager()

Initializes a new instance of the PnLManager.

public PnLManager()

Properties

PnL

Total profit-loss.

public decimal PnL { get; }

Property Value

decimal

RealizedPnL

The value of realized profit-loss.

public decimal RealizedPnL { get; }

Property Value

decimal

UnrealizedPnL

The value of unrealized profit-loss.

public decimal? UnrealizedPnL { get; }

Property Value

decimal?

UseCandles

Use CandleMessage for UnrealizedPnL calculation.

public bool UseCandles { get; set; }

Property Value

bool

UseLevel1

Use Level1ChangeMessage for UnrealizedPnL calculation.

public bool UseLevel1 { get; set; }

Property Value

bool

UseOrderBook

Use QuoteChangeMessage for UnrealizedPnL calculation.

public bool UseOrderBook { get; set; }

Property Value

bool

UseOrderLog

Use OrderLog for UnrealizedPnL calculation.

public bool UseOrderLog { get; set; }

Property Value

bool

UseTick

Use Ticks for UnrealizedPnL calculation.

public bool UseTick { get; set; }

Property Value

bool

Methods

Load(SettingsStorage)

Load settings.

public void Load(SettingsStorage storage)

Parameters

storage SettingsStorage

Storage.

ProcessMessage(Message, ICollection<PortfolioPnLManager>)

To process the message, containing market data or trade. If the trade was already processed earlier, previous information returns.

public PnLInfo ProcessMessage(Message message, ICollection<PortfolioPnLManager> changedPortfolios)

Parameters

message Message

The message, containing market data or trade.

changedPortfolios ICollection<PortfolioPnLManager>

Changed PortfolioPnLManager list.

Returns

PnLInfo

Information on new trade.

Reset()

To zero PnL.

public void Reset()

Save(SettingsStorage)

Save settings.

public void Save(SettingsStorage storage)

Parameters

storage SettingsStorage

Storage.