Positions
Summary
Provides access to methods of the positions collection.
Signature
1 | |
Namespace
cAlgo.API
Examples
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
See Also
Methods
Find (3)
Find (1 of 3)
Summary
Find a position by its label.
Signature
1 | |
Parameters
| Name | Type | Description |
|---|---|---|
| label | string | Label to search by |
Return Value
Position
Examples
1 | |
1 | |
Find (2 of 3)
Summary
Find a position by its label and symbol name.
Signature
1 | |
Parameters
| Name | Type | Description |
|---|---|---|
| label | string | Label to search by |
| symbolName | string | Symbol name to search by |
Return Value
Position
Examples
1 | |
1 | |
Find (3 of 3)
Summary
Find a position by its label, symbol name and trade type
Signature
1 | |
Parameters
| Name | Type | Description |
|---|---|---|
| label | string | Label to search by |
| symbolName | string | Symbol name to search by |
| tradeType | TradeType | Trade type to search by |
Return Value
Position
Examples
1 | |
1 | |
FindAll (3)
FindAll (1 of 3)
Summary
Find all positions with this label.
Signature
1 | |
Parameters
| Name | Type | Description |
|---|---|---|
| label | string | Label to search by |
Return Value
Position[]
Examples
1 2 3 4 5 6 | |
1 2 3 4 | |
FindAll (2 of 3)
Summary
Find all positions with this label and symbol name.
Signature
1 | |
Parameters
| Name | Type | Description |
|---|---|---|
| label | string | Label to search by |
| symbolName | string | Symbol name to search by |
Return Value
Position[]
Examples
1 2 3 4 5 6 | |
1 2 3 4 | |
FindAll (3 of 3)
Summary
Finds all the positions of this label, symbol name and trade type.
Signature
1 | |
Parameters
| Name | Type | Description |
|---|---|---|
| label | string | Label to search by |
| symbolName | string | Symbol name to search by |
| tradeType | TradeType | Trade type to search by |
Return Value
Position[]
Examples
1 2 3 4 5 6 | |
1 2 3 4 | |
FindById
Summary
Find Position by Id.
Signature
1 | |
Parameters
| Name | Type | Description |
|---|---|---|
| id | int | Position Id |
Return Value
Position
Examples
1 2 3 4 5 6 7 8 9 10 11 12 | |
1 2 3 4 5 6 7 8 9 10 11 12 | |
Properties
Item
Signature
1 | |
Return Value
Position
Count
Summary
The total number of open positions.
Signature
1 | |
Return Value
int
Examples
1 | |
1 | |
Events
Closed
Summary
Occurs each time a position is closed.
Signature
1 | |
Examples
1 2 3 4 5 6 7 8 9 | |
1 2 3 4 5 | |
Opened
Summary
Occurs each time a position is opened.
Signature
1 | |
Examples
1 2 3 4 5 6 7 8 | |
1 2 3 4 | |
Modified
Summary
Occurs each time a position is modified.
Signature
1 | |