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

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

# Position.TakeProfit

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

## TakeProfit

The take profit level of the position.

Environments: Desktop supported · CLI supported · Cloud supported.

C#:

```csharp
double? TakeProfit {get;}
```

Python:

```python
position.TakeProfit: float | None
```

### Returns

`double?` — 

### Examples

C#:

```csharp
var result = ExecuteMarketOrder(TradeType.Buy, SymbolName, 10000, "myLabel", 20, 40);
if (result.IsSuccessful && result.Position.TakeProfit.HasValue)
    Print("Take profit price: {0}", result.Position.TakeProfit.Value);
```

Python:

```python
result = api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, 10000, "myLabel", 20, 40)
if result.IsSuccessful and result.Position.TakeProfit is not None:
    api.Print(f"Take profit price: {result.Position.TakeProfit}")
```

