Class PositionPnLFormula
- Namespace
- ATAS.DataFeedsCore
- Assembly
- ATAS.DataFeedsCore.dll
The PnL formula of a position. The default one is linear: (price - average) * volume * multiplier.
Not in ATAS 8.0.15 yet: available from the next version.
public class PositionPnLFormula
- Inheritance
-
objectPositionPnLFormula
- Extension Methods
Constructors
PositionPnLFormula()
Creates the linear formula; derive from the class and override its methods for an instrument kind with another formula.
public PositionPnLFormula()
Fields
Default
The linear formula, used when a policy names no other one.
public static readonly PositionPnLFormula Default
Field Value
Methods
GetMultiplier(Security)
Money value of one price unit per one volume unit. Used by the open and the realized PnL.
public virtual decimal GetMultiplier(Security security)
Parameters
securitySecurity
Returns
- decimal
GetOpenPnL(Security, decimal, decimal, decimal)
Open PnL of the position (with a non zero average price) valued at the price.
public virtual decimal GetOpenPnL(Security security, decimal volume, decimal averagePrice, decimal price)
Parameters
securitySecurityvolumedecimalaveragePricedecimalpricedecimal
Returns
- decimal