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

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

# AbsoluteTakeProfitProtections.LastTakeProfit

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

## LastTakeProfit

Gets the final take profit that closes the remaining volume.

Environments: Desktop supported · CLI supported · Cloud supported.

C#:

```csharp
public AbsoluteTakeProfitLastProtection LastTakeProfit {get;}
```

Python:

```python
absoluteTakeProfitProtections.LastTakeProfit: AbsoluteTakeProfitLastProtection
```

### Returns

`AbsoluteTakeProfitLastProtection` — 

Available since cAlgo.API 5.8.

### Examples

C#:

```csharp
foreach (var position in Positions)
{
    if (position.AbsoluteTakeProfitProtections != null)
        Print("Position {0} closes the rest at {1}", position.Id, position.AbsoluteTakeProfitProtections.LastTakeProfit.Price);
}
```

Python:

```python
for position in api.Positions:
    if position.AbsoluteTakeProfitProtections is not None:
        api.Print(f"Position {position.Id} closes the rest at {position.AbsoluteTakeProfitProtections.LastTakeProfit.Price}")
```

