---
id: "P:cAlgo.API.Plugin.Positions"
kind: "property"
type: "T:cAlgo.API.Plugin"
url: "https://help.ctrader.com/ctrader-algo/references/General/Plugin/Positions/"
---

> Documentation index for agents: https://help.ctrader.com/ctrader-algo/llms.txt · machine index: https://help.ctrader.com/ctrader-algo/api.json

# Plugin.Positions

Member of [Plugin](https://help.ctrader.com/ctrader-algo/references/General/Plugin/index.md).

## Positions

The list of all open positions of the account.

Environments: Desktop supported · CLI not supported · Cloud not supported.

- CLI: Plugins cannot run in the CLI: ctrader-cli runs cBots only.
- Cloud: Plugins cannot run in the cloud: it runs cBots only.

C#:

```csharp
public Positions Positions {get;}
```

Python:

```python
api.Positions: Positions
```

### Returns

`Positions` — 

### Examples

C#:

```csharp
foreach (var position in Positions)
{
    if (position.StopLoss == null)
        ModifyPosition(position, 10, 20, ProtectionType.Relative);
}
```

Python:

```python
for position in api.Positions:
    if position.StopLoss is None:
        api.ModifyPosition(position, 10, 20, ProtectionType.Relative)
```

C#:

```csharp
var position = Positions.Find("myLabel", "EURUSD", TradeType.Sell);
if (position != null)
    Print("Found position {0} with net profit {1}", position.Id, position.NetProfit);
```

Python:

```python
position = api.Positions.Find("myLabel", "EURUSD", TradeType.Sell)
if position is not None:
    api.Print(f"Found position {position.Id} with net profit {position.NetProfit}")
```

