Table of Contents

Class Position

Namespace
ATAS.DataFeedsCore
Assembly
ATAS.DataFeedsCore.dll

Represents a trading position.

public class Position : IEntity
Inheritance
object
Position
Implements
Extension Methods

Constructors

Position()

public Position()

Properties

AccountID

Gets or sets the unique identifier of the account associated with this position.

public string AccountID { get; set; }

Property Value

string

AveragePrice

Gets or sets the average price at which the position was acquired.

public decimal AveragePrice { get; set; }

Property Value

decimal

AveragePriceValueType

Gets or sets the type of value used to calculate the average price of the position.

[Browsable(false)]
public PositionAveragePriceValueTypes AveragePriceValueType { get; set; }

Property Value

PositionAveragePriceValueTypes

Commission

Gets or sets the commission associated with this position.

public decimal Commission { get; set; }

Property Value

decimal

CurrentBuy

Gets or sets the current buy price for the financial instrument associated with this position.

public decimal CurrentBuy { get; set; }

Property Value

decimal

CurrentSell

Gets or sets the current sell price for the financial instrument associated with this position.

public decimal CurrentSell { get; set; }

Property Value

decimal

EntityType

public EntityType EntityType { get; }

Property Value

EntityType

Remarks

Gets the entity type, which is Position.

IsInPosition

Gets or sets whether the position is currently open (in position).

public bool IsInPosition { get; set; }

Property Value

bool

OpenVolume

Gets or sets the open volume (unfilled quantity) of the financial instrument associated with this position.

public decimal OpenVolume { get; set; }

Property Value

decimal

Parent

Gets or sets the parent or container object associated with this position.

public object? Parent { get; set; }

Property Value

object

PnlPercentType

Calculate pnl percent from portfolio balance or position margin.

public PnlPercentType PnlPercentType { get; set; }

Property Value

PnlPercentType

Portfolio

Gets or sets the portfolio associated with this position.

public Portfolio Portfolio { get; set; }

Property Value

Portfolio

RealizedPnL

Gets or sets the realized profit or loss associated with this position.

public decimal RealizedPnL { get; set; }

Property Value

decimal

Risk

Gets or sets information about marginal trading options. Null if marginal trading is not supported.

public RiskInfo? Risk { get; set; }

Property Value

RiskInfo

Security

Gets or sets the security associated with this position.

public Security Security { get; set; }

Property Value

Security

SecurityId

Gets or sets the unique identifier of the security associated with this position.

public string SecurityId { get; set; }

Property Value

string

TPlusLimit

Gets or sets the T+ limit associated with this position, if applicable.

[Browsable(false)]
public TPlusLimits? TPlusLimit { get; set; }

Property Value

TPlusLimits?

UnrealizedPnL

Gets or sets the unrealized profit or loss associated with this position.

public decimal UnrealizedPnL { get; set; }

Property Value

decimal

Volume

Gets or sets the current volume of the position.

public decimal Volume { get; set; }

Property Value

decimal

Remarks

Volume is positive for LONG positions and negative for SHORT.

Methods

Clone()

Creates a deep copy of the current position.

public Position Clone()

Returns

Position

A new instance of the Position class that is a copy of the current position.

OnPropertyChanged(string)

Raises the PropertyChanged event to notify subscribers that a property's value has changed.

protected void OnPropertyChanged(string name)

Parameters

name string

The name of the property that changed.

ToString()

public override string ToString()

Returns

string

Events

PropertyChanged

Added in ATAS 8.0.15.

public event PropertyChangedEventHandler? PropertyChanged

Event Type

PropertyChangedEventHandler