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

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

# Position.NetProfit

Member of [Position](https://help.ctrader.com/ctrader-algo/references/Trading/Positions/Position/index.md).

## NetProfit

The Net profit of the position.

Environments: Desktop supported · CLI supported · Cloud supported.

C#:

```csharp
double NetProfit {get;}
```

Python:

```python
position.NetProfit: float
```

### Returns

`double` — 

### Examples

C#:

```csharp
var position = Positions.Find("myLabel");
if (position != null && position.NetProfit > 100)
    ClosePosition(position);
```

Python:

```python
position = api.Positions.Find("myLabel")
if position is not None and position.NetProfit > 100:
    api.ClosePosition(position)
```

