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
stringPortfolio name.
Properties
PnL
Total profit-loss.
public decimal PnL { get; }
Property Value
PortfolioName
Portfolio name.
public string PortfolioName { get; }
Property Value
RealizedPnL
The value of realized profit-loss.
public virtual decimal RealizedPnL { get; }
Property Value
UnrealizedPnL
The value of unrealized profit-loss.
public decimal? UnrealizedPnL { get; }
Property Value
Methods
ProcessMessage(Message)
To process the message, containing market data.
public bool ProcessMessage(Message message)
Parameters
message
MessageThe message, containing market data.
Returns
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
ExecutionMessageTrade.
info
PnLInfoInformation on new trade.
Returns
Reset()
To zero PnL.
public void Reset()