Skip to content

Positions

Summary

Provides access to methods of the positions collection.

Signature

1
public abstract interface Positions

Namespace

cAlgo.API

Methods

Name Description
Find Find all positions with this label and symbol name.
FindAll Finds all the positions of this label, symbol name and trade type.

Properties

Name Description
Item { get; }
Count { get; } The total number of open positions.

Events

Name Description
Closed Occurs each time a position is closed.
Opened Occurs each time a position is opened.
Modified Occurs each time a position is modified.

Examples

1
 int totalPositions = Positions.Count;
1
 Position position =  Positions.Find("myLabel", Symbol, TradeType.Buy);
1
 Position[] positions = Positions.FindAll("myLabel", Symbol, TradeType.Buy);
1
 Positions.Opened += PositionsOnOpened;

See Also


Last update: December 5, 2022

Comments