Table of Contents

Class PortfolioPnLManager

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

The profit-loss manager, related for specified PortfolioName.

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

Constructors

PortfolioPnLManager(string)

Initializes a new instance of the PortfolioPnLManager.

public PortfolioPnLManager(string portfolioName)

Parameters

portfolioName string

Portfolio name.

Properties

PnL

Total profit-loss.

public decimal PnL { get; }

Property Value

decimal

PortfolioName

Portfolio name.

public string PortfolioName { get; }

Property Value

string

RealizedPnL

The value of realized profit-loss.

public virtual decimal RealizedPnL { get; }

Property Value

decimal

UnrealizedPnL

The value of unrealized profit-loss.

public decimal? UnrealizedPnL { get; }

Property Value

decimal?

Methods

ProcessMessage(Message)

To process the message, containing market data.

public bool ProcessMessage(Message message)

Parameters

message Message

The message, containing market data.

Returns

bool

PnL was changed.

ProcessMyTrade(ExecutionMessage, out PnLInfo)

To calculate trade profitability. If the trade was already processed earlier, previous information returns.

public bool ProcessMyTrade(ExecutionMessage trade, out PnLInfo info)

Parameters

trade ExecutionMessage

Trade.

info PnLInfo

Information on new trade.

Returns

bool

true, if new trade received, otherwise, false.

Reset()

To zero PnL.

public void Reset()