Positions


Summary

Provides access to methods of the positions collection.

Syntax

public interface Positions : IEnumerable

Members

NameTypeSummary
Closed EventOccurs each time a position is closed.
Count PropertyThe total number of open positions.
Find MethodFind a position by its label.
FindAll MethodFind all positions with this label.
Modified Event
Opened EventOccurs each time a position is opened.
this[int index] PropertyFinds a position by index.

Example 1

int totalPositions = Positions.Count;

Example 2

Position position =  Positions.Find("myLabel", Symbol, TradeType.Buy);

Example 3

Position[] positions = Positions.FindAll("myLabel", Symbol, TradeType.Buy);

Example 4

Positions.Opened += PositionsOnOpened;