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
RealizedPnL
The value of realized profit-loss.
public decimal RealizedPnL { get; }
Property Value
UnrealizedPnL
The value of unrealized profit-loss.
public decimal? UnrealizedPnL { get; }
Property Value
UseCandles
Use CandleMessage for UnrealizedPnL calculation.
public bool UseCandles { get; set; }
Property Value
UseLevel1
Use Level1ChangeMessage for UnrealizedPnL calculation.
public bool UseLevel1 { get; set; }
Property Value
UseOrderBook
Use QuoteChangeMessage for UnrealizedPnL calculation.
public bool UseOrderBook { get; set; }
Property Value
UseOrderLog
Use OrderLog for UnrealizedPnL calculation.
public bool UseOrderLog { get; set; }
Property Value
UseTick
Use Ticks for UnrealizedPnL calculation.
public bool UseTick { get; set; }
Property Value
Methods
Load(SettingsStorage)
Load settings.
public void Load(SettingsStorage storage)
Parameters
storage
SettingsStorageStorage.
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
MessageThe 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
SettingsStorageStorage.