PortfolioPnLManager

StockSharp.Algo.PnL

利润损失经理,涉及指定的PortfolioName。

实现: IPnLManager, IPersistable, ICloneable<IPnLManager>, ICloneable

构造函数

PortfolioPnLManager
public PortfolioPnLManager(string portfolioName, Func<SecurityId, Level1ChangeMessage> getSecDefinition)
portfolioPnLManager = PortfolioPnLManager(portfolioName, getSecDefinition)

利润损失经理,涉及指定的PortfolioName。

portfolioName
组合名.
getSecDefinition
获得金融工具定义功能.

属性

PortfolioName
public string PortfolioName { get; }
value = portfolioPnLManager.PortfolioName

组合名.

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

已实现的利润-损失的价值。

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

未实现损益的价值。

方法

Clone
public IPnLManager Clone()
result = portfolioPnLManager.Clone()

Creates a deep copy of a DataSeries

ProcessMessage
public bool ProcessMessage(Message message)
result = portfolioPnLManager.ProcessMessage(message)

处理包含市场数据的信息。

message
包含市场数据的信息.

返回值: PnL was changed.

ProcessMyTrade
public bool ProcessMyTrade(ExecutionMessage trade, PnLInfo info)
result = portfolioPnLManager.ProcessMyTrade(trade, info)

计算贸易利润。 如果交易已经提前处理, 则会返回先前的信息 。

trade
贸易。
info
新贸易信息.

返回值: 如果收到新的交易,否则,

Reset
public void Reset()
portfolioPnLManager.Reset()

复置set州.

UpdateSecurity
public void UpdateSecurity(Level1ChangeMessage l1Msg)
portfolioPnLManager.UpdateSecurity(l1Msg)

更新金融工具信息。

l1Msg
Level1ChangeMessage