Table of Contents

Interface IPosition

Namespace
Balsam
Assembly
Balsam.Common.dll

Defines the contract a position must implement.

public interface IPosition : IPortfolioHolding
Inherited Members
Extension Methods

Properties

BarsSinceEntry

Gets the number of bars since entry.

int BarsSinceEntry { get; }

Property Value

int

EntryDate

Gets the first entry date.

DateTime EntryDate { get; }

Property Value

DateTime

EntryPrice

Gets the average entry price.

double EntryPrice { get; }

Property Value

double

Id

Gets the position id.

long Id { get; }

Property Value

long

Instrument

Gets the instrument.

IInstrument Instrument { get; }

Property Value

IInstrument

LastDate

Gets the date of the last price update or the date on which the position was closed.

DateTime LastDate { get; }

Property Value

DateTime

LastPrice

Gets the last price or the exit price if the position has been closed.

double LastPrice { get; }

Property Value

double

PnL

Gets the P&L.

double PnL { get; }

Property Value

double

PnLPercent

Gets the P&L is percentage terms.

double PnLPercent { get; }

Property Value

double

Side

Gets the position side.

PositionSide Side { get; }

Property Value

PositionSide

StrategyName

Gets the strategy name.

string StrategyName { get; }

Property Value

string

Variables

Gets a collection of variables.

IDictionary<string, object> Variables { get; }

Property Value

IDictionary<string, object>