PnLManager
StockSharp.Algo.PnL
The profit-loss manager.
Implements: IPnLManager, IAsyncPersistable
Constructors
PnLManager
public PnLManager()
pnLManager = PnLManager()
Initializes a new instance of the PnLManager.
Properties
RealizedPnL
public decimal RealizedPnL { get; private set; }
value = pnLManager.RealizedPnL
pnLManager.RealizedPnL = value
The value of realized profit-loss.
UnrealizedPnL
public decimal UnrealizedPnL { get; }
value = pnLManager.UnrealizedPnL
The value of unrealized profit-loss.
UseCandles
public bool UseCandles { get; set; }
value = pnLManager.UseCandles
pnLManager.UseCandles = value
Use IsCandles for UnrealizedPnL calculation.
UseLevel1
public bool UseLevel1 { get; set; }
value = pnLManager.UseLevel1
pnLManager.UseLevel1 = value
Use Level1 for UnrealizedPnL calculation.
UseOrderBook
public bool UseOrderBook { get; set; }
value = pnLManager.UseOrderBook
pnLManager.UseOrderBook = value
Use MarketDepth for UnrealizedPnL calculation.
UseOrderLog
public bool UseOrderLog { get; set; }
value = pnLManager.UseOrderLog
pnLManager.UseOrderLog = value
Use OrderLog for UnrealizedPnL calculation.
UseTick
public bool UseTick { get; set; }
value = pnLManager.UseTick
pnLManager.UseTick = value
Use Ticks for UnrealizedPnL calculation.
Methods
CloneAsync
public ValueTask<IPnLManager> CloneAsync(CancellationToken cancellationToken)
result = pnLManager.CloneAsync(cancellationToken)
Create a copy of the manager.
- cancellationToken
- CancellationToken
Returns: Copy.
LoadAsync
public Task LoadAsync(SettingsStorage storage, CancellationToken cancellationToken)
result = pnLManager.LoadAsync(storage, cancellationToken)
Load settings.
- storage
- Storage.
- cancellationToken
- CancellationToken
Returns: Task
SaveAsync
public Task SaveAsync(SettingsStorage storage, CancellationToken cancellationToken)
result = pnLManager.SaveAsync(storage, cancellationToken)
Save settings.
- storage
- Storage.
- cancellationToken
- CancellationToken
Returns: Task