Table of Contents

Class PositionSnapshot

Namespace
ATAS.Indicators.Trading
Assembly
ATAS.Indicators.dll

A position of one account in one instrument at one moment, copied by the platform.

        <p>Not in ATAS 8.0.15 yet: available from the next version.</p>
public sealed class PositionSnapshot
Inheritance
object
PositionSnapshot
Extension Methods

Constructors

PositionSnapshot()

Initializes an empty snapshot (a flat position); the platform sets the values.

public PositionSnapshot()

Properties

AccountId

The account of the position.

public string AccountId { get; init; }

Property Value

string

AveragePrice

The average entry price of the open volume; 0 when flat.

public decimal AveragePrice { get; init; }

Property Value

decimal

OpenPnL

The unrealized profit or loss of the open volume, in the account currency.

public decimal OpenPnL { get; init; }

Property Value

decimal

RealizedPnL

The realized profit or loss of the account in the instrument, in the account currency.

public decimal RealizedPnL { get; init; }

Property Value

decimal

Remarks

The value as the connection reports it: the period it covers (the trading day, the session, or the whole history of the account) and whether commissions are included depend on the broker. A rule over a day's result stores the value at the start of its own day and compares with that; a drop between two checks is a realized loss.

SecurityId

The instrument of the position.

public string SecurityId { get; init; }

Property Value

string

Volume

The open volume in lots: positive for a long position, negative for a short one, 0 for flat.

public decimal Volume { get; init; }

Property Value

decimal