PnLQueue

StockSharp.Algo.PnL

The queue of profit calculation by messages stream.

Constructors

PnLQueue
public PnLQueue(SecurityId securityId)
pnLQueue = PnLQueue(securityId)

Initializes a new instance of the PnLQueue.

securityId
Security ID.

Properties

Leverage
public decimal Leverage { get; set; }
value = pnLQueue.Leverage
pnLQueue.Leverage = value

Leverage.

LotMultiplier
public decimal LotMultiplier { get; set; }
value = pnLQueue.LotMultiplier
pnLQueue.LotMultiplier = value

Lot multiplier.

PriceStep
public decimal PriceStep { get; private set; }
value = pnLQueue.PriceStep
pnLQueue.PriceStep = value

Price step.

RealizedPnL
public decimal RealizedPnL { get; private set; }
value = pnLQueue.RealizedPnL
pnLQueue.RealizedPnL = value

Realized profit.

SecurityId
public SecurityId SecurityId { get; }
value = pnLQueue.SecurityId

Security ID.

StepPrice
public decimal? StepPrice { get; private set; }
value = pnLQueue.StepPrice
pnLQueue.StepPrice = value

Step price.

UnrealizedPnL
public decimal UnrealizedPnL { get; }
value = pnLQueue.UnrealizedPnL

Unrealized profit.

Methods

Process
public PnLInfo Process(ExecutionMessage trade)
result = pnLQueue.Process(trade)

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

trade
Trade.

Returns: Information on new trade.

ProcessCandle
public void ProcessCandle(CandleMessage candleMsg)
pnLQueue.ProcessCandle(candleMsg)

To process CandleMessage message.

candleMsg
CandleMessage.
ProcessExecution
public void ProcessExecution(ExecutionMessage execMsg)
pnLQueue.ProcessExecution(execMsg)

To process the message, containing information on tick trade.

execMsg
The message, containing information on tick trade.
ProcessLevel1
public void ProcessLevel1(Level1ChangeMessage levelMsg)
pnLQueue.ProcessLevel1(levelMsg)

To process the message, containing market data.

levelMsg
The message, containing market data.
ProcessQuotes
public void ProcessQuotes(QuoteChangeMessage quoteMsg)
pnLQueue.ProcessQuotes(quoteMsg)

To process the message, containing data on order book.

quoteMsg
The message, containing data on order book.
UpdateSecurity
public void UpdateSecurity(Level1ChangeMessage levelMsg)
pnLQueue.UpdateSecurity(levelMsg)

To update the information on the instrument.

levelMsg
Level1ChangeMessage