PositionsCollection CLASS

Count PROPERTY (int)
Gets number of all open positions. SYNTAX public int Count { get; } EXAMPLE using System; using System.Collections.Generic; using System.Lin...
CloseAll () METHOD (Return: bool)
Close all positions. Returns an indication whether the positions are closed successfully. SYNTAX public bool CloseAll () RETURN bool true if...
CloseAllByAccount (Account account) METHOD (Return: bool)
Close all positions by specified account. Returns an indication whether the positions are closed successfully. SYNTAX public bool CloseAllByAccount ...
GetClosedPositionById (string positionId) METHOD (Return: Position)
Returns a closed before Position that represents a access to position objects specified by position ID. SYNTAX public Position GetClosedPositionById...
GetClosedPositionByOpenOrderId (string orderId) METHOD (Return: Position)
Gets a Position that represents a access to position object specified by order ID of which this position was opened. SYNTAX public Position GetClose...
GetPositionById (string positionId) METHOD (Return: Position)
Gets a Position that represents a access to position objects specifiedby by position ID. If position does not exist, return null. SYNTAX public Posi...
GetPositionByOpenOrderId (string orderId) METHOD Return: Position
Gets a Position that represents a access to position objects specified by order ID of which this position was opened. SYNTAX public Position GetPosi...
GetPositions () METHOD (Return: Position[])
Returns a collection of all opening positions. Access to the positions can be obtained by index. SYNTAX public Position[] GetPositions () RETURN...
PositionAdded EVENT
Occurs when the new position was placed (after order execution). Can be used when parameters are changed or position is closed. SYNTAX public event ...
PositionRemoved EVENT
Occurs when the position was closed (by user request or by trade server). SYNTAX public event Action<Position> PositionRemoved EXAMPLE ...