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

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

# OptimizationPass.NetProfit

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

## NetProfit

Gets the net profit of the pass.

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

- CLI: Available to plugins only, and plugins cannot run in the CLI.
- Cloud: Available to plugins only, and plugins cannot run in the cloud.

C#:

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

Python:

```python
optimizationPass.NetProfit: float
```

### Returns

`double` — 

Available since cAlgo.API 5.9.

### Examples

C#:

```csharp
Optimization.PassCompleted += args => Print("Pass {0} net profit: {1}", args.Pass.Id, args.Pass.NetProfit);
```

Python:

```python
api.Optimization.PassCompleted += lambda args: api.Print(f"Pass {args.Pass.Id} net profit: {args.Pass.NetProfit}")
```

