Table of Contents

Class PositionCalculationPolicy

Namespace
ATAS.DataFeedsCore
Assembly
ATAS.DataFeedsCore.dll

What the trading core calculates for the positions of a connector. Every field the policy does not name is taken from the broker as it is delivered.

Not in ATAS 8.0.15 yet: available from the next version.

public sealed class PositionCalculationPolicy
Inheritance
object
PositionCalculationPolicy
Extension Methods

Remarks

A connector returns the policy from GetPositionPolicy(Position). The policy is read every time it is needed, so a connector may return another one when its state changes (e.g. the first best price has arrived).

Constructors

PositionCalculationPolicy()

Creates a policy that calculates nothing, as BrokerOnly; set the properties to choose what the trading core calculates.

public PositionCalculationPolicy()

Fields

BrokerOnly

Nothing is calculated, the broker values are shown as they are.

public static readonly PositionCalculationPolicy BrokerOnly

Field Value

PositionCalculationPolicy

Properties

AllowSubscribeLevel1

Whether the core may subscribe the best prices of the position security (only used with CalculateOpenedPnL).

public bool AllowSubscribeLevel1 { get; init; }

Property Value

bool

CalculateAveragePrice

The average price is calculated from the trades instead of the one received from the broker.

public bool CalculateAveragePrice { get; init; }

Property Value

bool

CalculateClosedPnL

The realized PnL is calculated from the trades instead of the one received from the broker.

public bool CalculateClosedPnL { get; init; }

Property Value

bool

CalculateOpenedPnL

The open PnL is calculated from the best prices of the instrument instead of the one received from the broker. The prices of any connector providing the instrument are used, not only the ones of the position connector.

public bool CalculateOpenedPnL { get; init; }

Property Value

bool

CalculateVolume

The volume is the sum of the signed trades (the connector has no positions of the broker, e.g. replay).

public bool CalculateVolume { get; init; }

Property Value

bool

Formula

The PnL formula of the instrument kind (linear by default).

public PositionPnLFormula Formula { get; init; }

Property Value

PositionPnLFormula

IsCalculating

Whether the core has anything to do with the positions of the connector.

public bool IsCalculating { get; }

Property Value

bool

UsesExternalPrices

The connector does not deliver the best prices of its securities itself, so the core must subscribe the instrument of the position at the platform market data to get them from the other connectors.

public bool UsesExternalPrices { get; init; }

Property Value

bool