Table of Contents

Interface IPositionUpdater

Namespace
ATAS.DataFeedsCore
Assembly
ATAS.DataFeedsCore.dll

Writes what the broker reported about a position into the Position of the connector.

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

public interface IPositionUpdater
Extension Methods

Properties

IsPositionInitialized

Whether Update(decimal?, decimal?, decimal?, decimal?, decimal?, decimal?, RiskInfo?) has been called at least once, so the position holds what the broker reported.

bool IsPositionInitialized { get; }

Property Value

bool

Position

The position of the connector this updater writes to.

Position Position { get; }

Property Value

Position

Methods

Update(decimal?, decimal?, decimal?, decimal?, decimal?, decimal?, RiskInfo?)

Writes the broker values. The values the trading core calculates for the connector (see PositionCalculationPolicy) are not written: the core owns them.

bool Update(decimal? volume = null, decimal? averagePrice = null, decimal? openedPnL = null, decimal? closedPnL = null, decimal? commission = null, decimal? openVolume = null, RiskInfo? risk = null)

Parameters

volume decimal?
averagePrice decimal?
openedPnL decimal?
closedPnL decimal?
commission decimal?
openVolume decimal?
risk RiskInfo

Returns

bool

true if the position was changed, always on the first call.